Actions: Fix dominates() false positive in reusable workflows#21986
Open
JarLob wants to merge 3 commits into
Open
Actions: Fix dominates() false positive in reusable workflows#21986JarLob wants to merge 3 commits into
JarLob wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the CWE-829 “Untrusted Checkout (Critical)” query logic and fixtures to better recognize permission checks (including across reusable workflows) and to validate expected results.
Changes:
- Extend
ControlCheckdominance logic to account for checks that occur in the caller of a reusable workflow. - Add new GitHub Actions workflow fixtures covering permission-check patterns (and a “missing needs” negative case).
- Update the expected test results to include the new fixtures/edges.
Show a summary per file
| File | Description |
|---|---|
| actions/ql/lib/codeql/actions/security/ControlChecks.qll | Adds reusable-workflow caller coverage to control-check dominance logic. |
| actions/ql/test/query-tests/Security/CWE-829/UntrustedCheckoutCritical.expected | Updates expected edges/results for new workflow fixtures. |
| actions/ql/test/query-tests/Security/CWE-829/.github/workflows/untrusted_checkout_permissions_check.yml | Adds fixture where collaborator permission check precedes checkout. |
| actions/ql/test/query-tests/Security/CWE-829/.github/workflows/untrusted_checkout_permission_check_reusable.yml | Adds fixture where permission check precedes a reusable workflow call. |
| actions/ql/test/query-tests/Security/CWE-829/.github/workflows/untrusted_checkout_no_needs.yml | Adds negative fixture where the permission-check job exists but is not required by the checkout job. |
| actions/ql/test/query-tests/Security/CWE-829/.github/workflows/external/TestOrg/TestRepo/.github/workflows/build.yml | Adds external reusable workflow fixture used by the tests. |
| actions/ql/lib/change-notes/2026-06-15-permission_check.md | Adds changelog entry for the reusable-workflow support fix. |
Copilot's findings
- Files reviewed: 7/7 changed files
- Comments generated: 1
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.
No description provided.