githubEdit

CI/CD Security

Security testing for Continuous Integration and Continuous Deployment pipelines.

Skill Level: Intermediate to Advanced Prerequisites: Git, YAML, basic DevOps concepts

Attack Surface

CI/CD systems are high-value targets because they:
- Have access to source code
- Store secrets (API keys, credentials)
- Can deploy to production
- Often have elevated cloud permissions
- Trust code from repositories

GitHub Actions

Secrets Extraction

# Secrets accessible via ${{ secrets.NAME }}
# Check for exposed secrets in logs

steps:
  - name: Expose secrets (malicious)
    run: |
      echo "${{ secrets.AWS_ACCESS_KEY }}" | base64
      env | base64
      cat $GITHUB_ENV

Workflow Injection

GITHUB_TOKEN Abuse

Self-Hosted Runner Exploitation

Poisoned Pipeline Execution (PPE)

GitLab CI

Variable Extraction

Runner Token Abuse

Protected vs Unprotected Variables

Jenkins

Script Console RCE

Credentials Extraction

Pipeline Secrets in Logs

CVE-2024-23897 (File Read)

Azure DevOps

Variable Groups

Service Connection Abuse

Agent Exploitation

Artifact Poisoning

Dependency Confusion

Build Cache Poisoning

Container Registry Attacks

Post-Exploitation

Lateral Movement

Persistence

Detection & Defense

Tools

Last updated

Was this helpful?