Skip to content

Actions: Update cache poisoning queries for the new cache-mode syntax - #22613

Open
JarLob wants to merge 1 commit into
github:mainfrom
JarLob:cachemode
Open

JarLob wants to merge 1 commit into
github:mainfrom
JarLob:cachemode

Conversation

@JarLob

@JarLob JarLob commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Copilot AI balanced review requested due to automatic review settings September 17, 2026 18:30
@JarLob
JarLob requested a review from a team as a code owner September 17, 2026 18:30

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.

Copilot review overview

🟡 Changes recommended

Two moderate findings remain in CachePoisoningQuery.qll concerning tags-ignore handling and implicit caller-mode propagation.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite (auto)
Findings: 1 Medium severity

Note

Copilot is running an experiment and ran this review at Lite.

Open (1)
What changed in this PR

Updates CodeQL’s GitHub Actions cache-poisoning analysis for the new cache-mode syntax, reusable-workflow limits, and trigger scenarios.

Changes:

  • Adds cache-mode AST accessors and effective-mode analysis.
  • Expands cache-write and cache-poisoning fixtures, triggers, and expected results.
  • Updates CWE-349 documentation and query/library change notes.
File Reviewed change
actions/​ql/​test/​query-tests/​Security/​CWE-349/​CacheWriteAccess.ql Adds cache-mode cache-write behavior tests.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​CacheWriteAccess.expected Records expected cache-write results.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​CachePoisoningViaPoisonableStep.expected Updates expected poisonable-step results.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​CachePoisoningViaDirectCache.expected Updates expected direct-cache results.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​CachePoisoningViaCodeInjection.expected Updates expected code-injection results.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​poisonable_step1.yml Adds poisonable-step workflow coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​direct_cache1.yml Adds direct-cache workflow coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​code_injection1.yml Adds code-injection workflow coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_write_capable_workflow_dispatch.yml Adds workflow-dispatch trigger coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_write_capable_reusable_workflow_caller.yml Adds reusable-workflow caller coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_write_capable_push.yml Adds push-trigger coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_write_capable_pull_request.yml Adds pull-request trigger coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_mode_reusable.yml Adds reusable-workflow cache-mode coverage.
actions/​ql/​test/​query-tests/​Security/​CWE-349/​.github/​workflows/​cache_mode_nested.yml Adds nested cache-mode coverage.
actions/​ql/​src/​Security/​CWE-349/​CachePoisoningViaPoisonableStep.md Documents cache-mode guidance.
actions/​ql/​src/​Security/​CWE-349/​CachePoisoningViaDirectCache.md Documents cache-mode guidance.
actions/​ql/​src/​Security/​CWE-349/​CachePoisoningViaCodeInjection.md Documents cache-mode guidance.
actions/​ql/​src/​change-notes/​2026-09-17-cache-mode.md Documents query behavior changes.
actions/​ql/​lib/​codeql/​actions/​security/​CachePoisoningQuery.qll Implements cache-mode and trigger analysis. Two moderate findings remain: tags-ignore handling suppresses valid default-branch findings (2 votes), and implicit caller-mode propagation can incorrectly allow write callees (1 vote).
actions/​ql/​lib/​codeql/​actions/​ast/​internal/​Ast.qll Adds internal cache-mode accessors.
actions/​ql/​lib/​codeql/​actions/​Ast.qll Exposes cache-mode accessors.
actions/​ql/​lib/​change-notes/​2026-09-17-cache-mode.md Documents library and API changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread actions/ql/lib/codeql/actions/security/CachePoisoningQuery.qll
@github-actions github-actions Bot added documentation Actions Analysis of GitHub Actions labels Sep 17, 2026
@JarLob

JarLob commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

/cc: @gregose

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.

2 participants