Repository navigation
ci: add trusted CodeQL scanning for organization controls - #19
Merged
Merged
Conversation
openboa
marked this pull request as ready for review
September 30, 2026 10:37
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
The central repository currently validates policy, secrets and isolated candidate tests, but does not run CodeQL on its own JavaScript controls or GitHub Actions. Extend the existing ci.yml with separate JavaScript/TypeScript and Actions analysis lanes. Both use pinned CodeQL actions, build-mode:none, inert exact-commit candidate source and the base-owned SARIF parser. PR analyses explicitly target refs/pull//head and the candidate SHA; main analyses use the actual push ref/SHA.
Keep the existing admission and isolated verification sequence intact. The only write permission remains security-events:write in the trusted scanner job. Preserve the exact Organization controls verification aggregate name, requiring both original verification and all CodeQL lanes to succeed; failures, cancellation, skips and missing results fail closed. Existing triggers and reusable Coffee controls stay unchanged.
Validation: npm test passed (30 passed; 1 Linux-only filename test skipped on macOS), all workflow actionlint checks, shell/Node syntax checks and git diff --check passed. Focused tests exercise 25 aggregate result combinations plus the scanner trust boundary and commit attribution. Independent read-only candidate review found no blocking issue.
Activation limit: pull_request_target uses the existing main workflow, so this PR's hosted CI validates the candidate through the old trusted boundary. The new scanner and aggregate require verification after an authorized merge; no candidate-owned privileged bootstrap or substitute success check was introduced.