ci(security): scope codeql cancel-in-progress to PR events only - #91
Conversation
The workflow-level concurrency block cancelled every in-flight run on push to master. When several PRs merged within the typical CodeQL run duration (~3-4 min), each merge cancelled its predecessor's scan before SARIF could upload. On 2026-05-09, four consecutive master commits (#77, #78, #79, #82) had cancelled CodeQL runs for exactly this reason — only #81 (the last in the chain) actually completed. For PR events the cancel-on-update behavior is correct: each new push to a PR branch makes the prior run obsolete. For master events every commit must be scanned end-to-end. Gating cancel-in-progress on github.event_name == 'pull_request' keeps PR responsiveness while ensuring master commits queue rather than preempt.
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes the gap where master commits could miss CodeQL scanning during merge bursts.
The workflow-level concurrency block:
```yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
```
cancelled in-flight runs across every trigger including `push: master`. On 2026-05-09 four consecutive master commits had cancelled CodeQL runs because each merge preempted the previous scan before SARIF upload:
Only the final commit in the chain ever got scanned. The intermediate four are unscanned in GitHub Code Scanning state.
Fix
```yaml
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
```
Test plan
Note
This does NOT close the same hole in the `security` workflow if it has the same pattern — quick check shows `security.yml` is a different workflow with its own concurrency. Out of scope here; if it has the same issue I'll open a follow-up.