← OWASP Top 10 CI/CD Security Risks
CICD-SEC-5
Insufficient PBAC (Pipeline-Based Access Controls)
Pipelines and the jobs inside them get more access than they need: write tokens, every secret, shared runners. Once one step is compromised, the rest of the pipeline's access comes with it.
Summary in ghtier's words. Read OWASP CI/CD's own text
Incidents (6)
Last 12 months (2): prt-scan: automated pull_request_target attacks, hackerbot-claw autonomous agent RCE
2026
- prt-scan: automated pull_request_target attacksOrganization March 2026
- hackerbot-claw autonomous agent RCEOrganization February 2026
2025
- GitHub MCP / agentic token breadthApplication May 2025
2023
- Self-hosted runner takeovers (PyTorch and others)Organization January 2023
2022
- GitHub App installation token abuseApplication January 2022
2021
- "Pwn requests": pull_request_target & workflow_runOrganization April 2021
Attack path techniques used
- Push directly, without review (Submit malicious code)
- Have a workflow approve the PR (Submit malicious code)
- Run PR code in a privileged workflow (Steal CI secrets and tokens)
- Read secrets from the runner (Steal CI secrets and tokens)
- Backdoor a persistent self-hosted runner (Poison the build or published package)
- Get an agent to copy private code into public (Read or expose private code)
Checklist items
The fixes for those techniques, plus the items ghtier tags with this risk.
- Branch protection on default/release branches: required reviews + required status checks
- Rulesets applied: push restriction, tag protection, sensitive file-path protection
- Set the default GITHUB_TOKEN permission to read-only at the org level
- Audit every use of pull_request_target and remove or restructure risky ones
- Require approval for first-time/external contributor workflow runs on forks
- Third-party Actions pinned to a full commit SHA instead of a mutable tag or branch
- Restrict which Actions can run to GitHub-verified creators or an internal allow-list
- Disallow self-hosted runners on public repositories
- Review every currently installed GitHub App / OAuth App and its granted scope
- Keep OAuth app access restrictions on and require security/IT approval for new apps
- Turn off "Allow GitHub Actions to create and approve pull requests"
- Put production secrets in environments with required reviewers
- Limit each self-hosted runner group to the repositories that need it
Permissions involved
The GitHub permissions those incidents abused.