Skip to content

Actions: Fix dominates() false positive in reusable workflows#21986

Open
JarLob wants to merge 3 commits into
github:mainfrom
JarLob:userpermissions
Open

Actions: Fix dominates() false positive in reusable workflows#21986
JarLob wants to merge 3 commits into
github:mainfrom
JarLob:userpermissions

Conversation

@JarLob

@JarLob JarLob commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@JarLob JarLob requested a review from a team as a code owner June 15, 2026 05:49
Copilot AI review requested due to automatic review settings June 15, 2026 05:49
@github-actions github-actions Bot added documentation Actions Analysis of GitHub Actions labels Jun 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ControlCheck dominance 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

Comment thread actions/ql/lib/codeql/actions/security/ControlChecks.qll Outdated
Comment thread actions/ql/lib/codeql/actions/security/ControlChecks.qll Fixed
@JarLob JarLob marked this pull request as draft June 15, 2026 06:34
@JarLob JarLob marked this pull request as ready for review June 15, 2026 06:52
@owen-mc owen-mc changed the title Fix dominates() false positive in reusable workflows Actions: Fix dominates() false positive in reusable workflows Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions Analysis of GitHub Actions documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants