Skip to content

Actions: Normalize explicit untrusted checkout paths#22221

Draft
1sgtpepper wants to merge 1 commit into
github:mainfrom
1sgtpepper:agent/normalize-untrusted-checkout-paths
Draft

Actions: Normalize explicit untrusted checkout paths#22221
1sgtpepper wants to merge 1 commit into
github:mainfrom
1sgtpepper:agent/normalize-untrusted-checkout-paths

Conversation

@1sgtpepper

@1sgtpepper 1sgtpepper commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #22213.

Summary

  • Canonicalize explicit relative actions/checkout paths and static local script or action operands before component-aware containment checks.
  • Preserve the existing fallback for dynamic checkout paths and workspace-root execution.
  • Add focused pull_request_target and workflow_run coverage for bare, dot-relative, trailing-slash, nested, quoted, sibling, and escaping paths.

Workspace-variable and context-expression resolution remain out of scope. This PR does not change shared path normalization or poisonable-step modeling.

Validation

  • codeql test run actions/ql/test/query-tests/Security/CWE-829 actions/ql/test/query-tests/Security/CWE-349 actions/ql/test/library-tests/basic --threads=1 (15/15 passed)
  • codeql query format --check-only for the changed QL files
  • git diff --check

The expected query output was generated with codeql test run --learn, inspected for the intended Critical results, and verified with a non-learning run.

@github-actions github-actions Bot added documentation Actions Analysis of GitHub Actions labels Jul 21, 2026
@1sgtpepper
1sgtpepper force-pushed the agent/normalize-untrusted-checkout-paths branch 3 times, most recently from 4050936 to 857758f Compare July 23, 2026 07:24
@1sgtpepper

Copy link
Copy Markdown
Author

@oscarsj, the current draft fixes #22213. I’m apprehensive about expanding this PR into shared path-model behavior, so I think the broader cases should be deferred to a separate follow-up. Does that scope sound right?

@1sgtpepper
1sgtpepper force-pushed the agent/normalize-untrusted-checkout-paths branch from 483c1f2 to 05933be Compare July 23, 2026 13:43
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.

[actions] Alternate actions/checkout paths suppress untrusted-checkout alerts

1 participant