SITF technique T-C021: AI Agent Prompt Injection in Workflow
Component: CI/CDStage: Initial AccessID: T-C021
Attacker crafts malicious input (issue titles, PR descriptions, comments) that manipulates an AI coding agent running in CI/CD to execute arbitrary commands or exfiltrate data.
SITF technique T-C021 (AI Agent Prompt Injection in Workflow) is a Initial Access technique in the SDLC Infrastructure Threat Framework (SITF). It targets the CI/CD component (Continuous Integration/Deployment systems).
Risks that enable this technique
- AI agents with Bash/shell execution capabilities in workflows
- AI agents with Write/Edit file permissions
- User-controlled input passed to AI prompts without sanitization
- Overly permissive AI tool configurations (allowedTools includes Bash)
- AI workflows triggered by any GitHub user (no write-access requirement)
- No input validation or content filtering for AI context
- AI agents with access to workflow secrets
- No human approval gates for AI-suggested actions
Protective controls
- Restrict AI agent tool permissions — Remove Bash, Write, and Edit from allowedTools when processing untrusted input
OWASP SPVS: V3.1 Security of Pipeline Environment - Input sanitization before AI context injection — Filter or escape user-controlled input before including in AI prompts
OWASP SPVS: V2.1 Secure Coding Practices - Require write access to trigger AI-powered workflows — Do not use 'allowed_non_write_users: *' for AI workflows with code execution
OWASP SPVS: V3.1 Security of Pipeline Environment - Sandboxed AI execution environment — Run AI agents in isolated environment without secret access
OWASP SPVS: V3.1 Security of Pipeline Environment - Human approval gates for AI-suggested actions — Require human review before AI agent executes code changes or commands
OWASP SPVS: V3.1 Security of Pipeline Environment - Separate AI workflows from release/publish workflows — Isolate AI triage workflows from workflows with publishing credentials
OWASP SPVS: V3.1 Security of Pipeline Environment; V3.2 Credential Hygiene - Rate limiting for AI workflow triggers — Prevent abuse by limiting frequency of AI workflow invocations per user
OWASP SPVS: V5.2 Security Standard Enforcement
Detective controls
- AI prompt injection detection — Monitor AI inputs for prompt injection patterns and adversarial instructions
OWASP SPVS: V5.4 Detection & Monitoring - Audit logging of AI agent actions — Log all commands executed by AI agents for forensic analysis
OWASP SPVS: V5.4 Detection & Monitoring - Anomaly detection for AI workflow behavior — Alert on unusual AI agent actions like npm install from external commits
OWASP SPVS: V5.4 Detection & Monitoring - Runtime agent on runner — Monitor AI workflow execution for malicious behavior patterns
OWASP SPVS: V5.4 Detection & Monitoring
Detection rule (sigma):proc_creation_lnx_susp_npm_installSuspicious NPM Install from External Source
Observed in
- Clinejection (incident)
Explore
- Open T-C021 in the interactive technique library
- Map an attack using T-C021 in the SITF flow builder
- Previous CI/CD technique: T-C020 CI/CD Misconfiguration Exploitation
How to reference
Cite as SITF technique T-C021 (AI Agent Prompt Injection in Workflow), SDLC Infrastructure Threat Framework (SITF), https://wiz-sec-public.github.io/SITF/techniques/T-C021.html.