ci: run CodeQL analysis for merge-queue entries - #3643
Merged
Conversation
HAYDEN-OAI
marked this pull request as ready for review
August 17, 2026 23:42
Contributor
jbeckwith-oai
approved these changes
Aug 18, 2026
jbeckwith-oai
left a comment
Contributor
There was a problem hiding this comment.
Reviewed exact head eec875452cbb7ffa93d683a1b46f0dd94d42a4ce in two independent passes.
The existing advanced CodeQL workflow correctly adds merge_group: checks_requested and disables persisted checkout credentials. Event/ref semantics, fork handling, SARIF uploads, action pins, token permissions, current merge-queue rules, and coexistence with the separate dynamic analysis are sound. All substantive exact-head checks passed.
No findings. After deployment, observe one successful real merge-group scan before considering any separate required-check ruleset change.
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.
Changes being requested
merge_groupchecks_requestedevents, in addition to the existing main-targeted pull-request, main-push, and manual paths.Analyze Pythonjob/check name, SARIF category, Python language, timeout, full-SHA CodeQL/checkout action pins, and existingactions: read,contents: read,security-events: writepermissions.persist-credentials: falseon checkout so repository credentials are not left available to subsequent analysis steps.pull_requestbehavior for external forks; existing repository policy still requires a maintainer to approve external-contributor workflow execution.Verification
init+analyze, existing PR/push/manual behavior, merge-queue-onlychecks_requested, unchanged job/check identity and permissions, three immutable action pins, and no skipped placeholder orpull_request_target.Analyze Pythonjob successfully.python scripts/check-python-version-policy.pygit diff origin/main...HEAD --checkRequired-check rollout safety
The active
mainruleset already requires a merge queue, but there have been zero CodeQLmerge_groupruns. Requiring any CodeQL check immediately would deadlock legitimate merges, so this PR does not modify live rules.After this workflow reaches
main, confirmAnalyze Pythonsucceeds on an actual merge-group SHA and an approved fork PR. Only then add{ "context": "Analyze Python", "integration_id": 15368 }to the existing required checks while preserving every current rule. The separateCodeQLAdvanced Security check and dynamicAnalyze (python)check are not proven to run on merge-group events.