Complete Guide
🔥 Advanced
Refreshed: March 2026

CI/CD & Supply Chain Security

The software supply chain is the new frontier of offensive security. A single compromised build pipeline can grant access to thousands of downstream targets. This guide covers exploitation, defense, and industry frameworks across 12 sections.

High-Impact Attack Surface

Supply chain attacks have caused some of the largest security breaches in history. SolarWinds compromised 18,000+ organizations including US government agencies. The xz-utils backdoor (2024) demonstrated how patient adversaries can subvert even open-source infrastructure. This is where elite adversaries operate.

Frameworks Covered

OWASP Top 10 CI/CD Risks · SLSA v1.0 (Supply-chain Levels for Software Artifacts) · NIST SP 800-218 (SSDF) · Sigstore · in-toto · CIS Software Supply Chain Security

Assessment Tiers

TIER 1 — Developer

First-time CI/CD security assessment

Sections: 01, 06, 09
  • • GitHub Actions basics
  • • Secrets scanning
  • • IaC security

TIER 2 — Platform Engineer

Enterprise pipeline security

Add Sections: 02, 04, 05, 07, 08
  • • Jenkins/GitLab exploitation
  • • OIDC federation attacks
  • • Container registries & GitOps

TIER 3 — Red Team / Supply Chain

Advanced supply chain operations

Add Sections: 03, 10, 11, 12
  • • Dependency poisoning
  • • SLSA & provenance bypasses
  • • AI/ML pipeline attacks

What You'll Learn

✅ Exploit GitHub Actions, Jenkins, GitLab, and Azure DevOps pipelines
✅ Perform dependency confusion and typosquatting attacks
✅ Abuse OIDC federation to steal cloud credentials
✅ Poison container registries and GitOps sync loops
✅ Extract secrets from repos, logs, and artifacts
✅ Assess SLSA maturity and SBOM completeness

Prerequisites

CI/CD Foundations

  • • Git fundamentals (branches, PRs)
  • • YAML pipeline syntax
  • • Docker basics

Offensive Skills

  • • Command injection
  • • Token/credential abuse
  • • API enumeration

Recommended Context

Attack Surface Overview

👨‍💻
Developer
Phishing, credential theft
🔄
CI/CD Pipeline
Config injection, runner abuse
📦
Artifact
Backdoored binaries
⚠️ Compromise anywhere = Compromise everywhere downstream

Key Attack Techniques

🔓 Secret Extraction

Dumping CI/CD environment variables, stealing API keys, cloud credentials, and tokens from build logs.

💉 Pipeline Injection

Modifying build configs to execute arbitrary code during CI/CD runs (workflow files, Jenkinsfiles).

🏃 Runner Compromise

Attacking self-hosted runners for persistence, lateral movement into internal networks.

📦 Dependency Attacks

Typosquatting, dependency confusion, and package hijacking on NPM/PyPI/etc.

Learning Modules

Real-World Supply Chain Attacks

These aren't theoretical. Study them.

Attack Impact Technique
SolarWinds (2020) 18,000+ organizations Build system compromise, backdoor injection
Codecov (2021) 29,000+ customers Bash uploader script modified to exfiltrate env vars
ua-parser-js (2021) 7M weekly downloads NPM account takeover, crypto miner injection
Log4Shell (2021) Millions of apps Dependency vulnerability (transitive supply chain)
PyTorch (2022) ML community Dependency confusion on torchtriton
CircleCI (2023) All customers Session token theft, secrets exposed
3CX (2023) 600K+ organizations Compromised build env via Trading Technologies
xz-utils (2024) Linux infrastructure Multi-year social engineering, backdoor in build

Quick Recon

Find GitHub Actions workflow files
find . -path "*/.github/workflows/*.yml" -o -path "*/.github/workflows/*.yaml"
Search for hardcoded secrets in repos
trufflehog git https://github.com/target/repo --only-verified
Check NPM package for install scripts
npm pack <package> && tar -xzf *.tgz && cat package/package.json | jq '.scripts'

Essential Resources