Skip to content

Add agent_workflow_injection check for AI-agent CI steps - #2300

Closed
remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/agentic-actions-injection
Closed

remigiusz-antczak wants to merge 1 commit into
mainfrom
feat/agentic-actions-injection

Conversation

@remigiusz-antczak

Copy link
Copy Markdown
Collaborator

Closes the agentic-actions / CI prompt-injection depth gap. Existing coverage (zizmor routing, appsec-supply.md A03 prose) handled generic script injection and pull_request_target; nothing looked at AI-agent steps.

  • New scripts/agent_workflow_injection.py, run by review_checks.sh on changed workflows as tool agent-injection (leads, report-only, stdlib, line-based).
  • Rules: agent-untrusted-input (issue/PR/comment/branch text into a Claude, Codex, Gemini or Copilot step, with token and secret reach named), agent-head-checkout (PR head checked out beside an agent under pull_request_target, issue_comment or workflow_run), agent-broad-tools (sandbox or approval off, unrestricted Bash, any-user trigger).
  • One review question added to appsec-supply.md.
  • Tests: 5/5 in scripts/test_agent_workflow_injection.py (positive per rule, decoys, review_checks step).

Note: origin/main already had review-config.md and security-review-mode.md over their size budgets, so this commit resyncs those two rows with markers.

Flag names are matched as patterns and not re-verified against each vendor's current docs; hence "leads".

🤖 Generated with Claude Code

…sider text can steer

review_checks.sh now runs agent_workflow_injection.py on changed workflows (tool agent-injection). It lists as leads: issue, PR, comment or branch-name text interpolated into an AI-agent step (with the job's token and secret reach named), a pull-request head checked out beside an agent under pull_request_target, issue_comment or workflow_run, and agent steps with sandbox or approval off, an unrestricted Bash tool, or an any-user trigger. appsec-supply.md gains the matching review question. Tests cover a positive and a decoy per rule plus the review_checks step.

Tests: 5/5

size-budget-raise: .claude/skills/deep-code-review/references/appsec-supply.md 10495→11005
size-budget-raise: .claude/skills/INDEX.md 18145→18283
size-budget-raise: .claude/skills/deep-code-review/INDEX-scripts.md 9207→9429
size-budget-raise: .claude/skills/deep-code-review/references/review-config.md 6472→6888
size-budget-raise: .claude/skills/deep-code-review/references/security-review-mode.md 13589→14643

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@remigiusz-antczak

Copy link
Copy Markdown
Collaborator Author

Superseded by #2301.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant