Repository navigation
ci: scan v2/main with a committed CodeQL advanced-setup workflow - #2741
Merged
Merged
Conversation
CodeQL default setup analyzes only the default branch and PRs into it, so no v2/main work was scanned until the milestone-merge PR (#2540). Add .github/workflows/codeql.yml: push and pull_request on main and v2/main plus the weekly schedule, same languages and default suite, timeout sized from 30 observed default-setup runs. The analyze job holds security-events: write, so verify:action-pins now counts that scope as credentialed and the job's actions are SHA-pinned. Closes #2545 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
Closed
3 tasks
There was a problem hiding this comment.
🟢 Approval recommended
The workflow and pin-enforcement changes are consistent, have focused regression coverage, and have no unresolved findings.
No open issues 🎉
What changed in this PR
Adds committed CodeQL scanning so v2/main changes are checked before milestone merges into main.
Changes:
- Adds SHA-pinned CodeQL scans for pushes, pull requests, and a weekly schedule.
- Extends action-pin enforcement to
security-events: write, with regression coverage. - Documents the workflow and requirement to disable default setup.
| File | Description |
|---|---|
scripts/verify-action-pins.test.mjs |
Tests scan-upload permissions as credentialed. |
scripts/verify-action-pins.mjs |
Requires immutable action pins for scan-upload jobs. |
docs/quality-gate.md |
Documents CodeQL coverage and setup requirements. |
.github/workflows/codeql.yml |
Adds scanning for both development and release branches. |
Review effort: Balanced
Member
Author
|
Copilot review loop closed: round 1 was clean (no inline comments, no suppressed findings, 'Approval recommended'), so no further rounds. The PR's own CodeQL run uploaded both analyses ( |
Closed
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2545
CodeQL default setup scans only the default branch (
main) and PRs into it, so nov2/mainwork was scanned until the milestone-merge PR. That is where the v2.9.0 ReDoS (#2540) surfaced.Changes
.github/workflows/codeql.yml: advanced setup. Runs onpushandpull_requestformainandv2/main, plus the weeklyschedule. Same languages (actions,javascript-typescript), default query suite,build-mode: none. Checkout usespersist-credentials: false.timeout-minutes: 10is sized from 30 observed default-setup runs (slowest job about 4.7 min, doubled and rounded up).verify:action-pinsnow countssecurity-events: writeas credentialed. Before this change the guard would not have treated this job as credentialed, so the pins the issue requires would have gone unenforced. That scope uploads the scan results, so a moved tag could silently drop every alert. checkout and codeql-actioninit/analyzeare pinned vianpm run action:resolve-pin. The guard's test now includes asecurity-events: writejob. Mutation check: replacing theanalyzepin with@v4makes the guard fail.docs/quality-gate.md: a paragraph on the new workflow.Default setup
Default setup is a repo setting, and GitHub rejects advanced-setup uploads while it is on. Per the maintainer's call, it is being disabled right after this PR opens, so this PR's own run proves the workflow on a
v2/main-targeted PR. Until the v2.12.0 milestone merge carries this file tomain,maingets no push or scheduled scans. The milestone PR itself is still scanned, becausepull_requestruns from the PR's ref.npm run local:gateis green.🤖 Generated with Claude Code