1 CI/CD Attack Vectors
CI/CD pipelines have elevated privileges for deployment. Compromising a pipeline can mean full control of production infrastructure.
Secrets in CI logs:
# Vulnerable GitHub Action
- name: Deploy
run: |
echo "API Key: $API_KEY" # Logged to CI output!
curl -H "Authorization: $DB_PASSWORD" https://api.example.com
# Passwords in error messages also appear in logsMalicious PR execution (poisoned pipeline execution - PPE):
# Vulnerable workflow triggered on pull_request from forks
on:
pull_request:
# No restriction — anyone can trigger this!
steps:
- uses: actions/checkout@v3
- run: npm test # Runs code from the PR — ATTACKER CONTROLS THIS!
- run: deploy.sh ${{ secrets.PROD_TOKEN }} # Secret accessible to PR code!Long-lived credentials: Static IAM keys stored as CI secrets can be exfiltrated and used indefinitely after a CI compromise.