[Bug] Spurious `remote: error: GH013: Repository rule violations found for refs/heads/trunk.` `remote: - Code scanning is waiting for results from CodeQL for the commit`

未關閉
#19,459 3 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
20/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
停滯
技術堆疊
github
領域
ci-cd, security

研究方向

未識別來源檔案、測試或 CodeQL 進入點。請先重現所述 CI 分支合併期間間歇性發生的 GH013 拒絕,並檢查 CodeQL 與分支保護結果;完成條件是找出已完成的掃描為何被回報為擱置中,並記錄可驗證的修正方案。

由索引模型根據 Issue 內容生成。

描述

false-positive

Description of the false positive

remote: error: GH013: Repository rule violations found for refs/heads/trunk.
remote: Review all repository rules at https://github.com/SwuduSusuwu/SusuLib/rules?ref=refs%2Fheads%2Ftrunk
remote:
remote: - Code scanning is waiting for results from CodeQL for the commit 493026f.
remote:
To ssh://github.com/SwuduSusuwu/SusuLib.git
 ! [remote rejected]   a32d469e~4 -> trunk (push declined due to repository rule violations)
error: failed to push some refs to 'ssh://github.com/SwuduSusuwu/SusuLib.git'

Code samples or links to source code
This is not related to particular source code. It happens at random when merging from continuous integration branches into trunk.

Have set the rules to require that all code reviews to allow to merge.
For huge pull requests, this can take over an hour (to push all of the commits to the branch in order, 1 by 1, waiting for the scans / reviews to finish after push).

  • Numerous huge pull requests (which took months to produce, and over an hour just to push the individual commits in order and wait for the results after each push) were ruined because of this (once all of the tests pass and you start to push those individual commits to trunk, spurious errors result in all commits pushed to trunk being removed from the pull request, with no possible commands to insert those back into the pull request if branch protection of trunk blocks force pushes).

URL to the alert on GitHub code scanning (optional)

Irrelevant, since had to redo

主要語言
CodeQL
星號
10.1k
分支
2.1k
平均合併
2 天 10 小時
30 天內合併 PR
134

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/codeql 的其他 Issue

查看 github/codeql 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。