Toutes les vulnérabilités
CRITICALSupply chainexploited in the wild

SC-PPE-CICDSEC4-2022

CI/CD · Poisoned Pipeline Execution (PPE)

Résumé

Poisoned Pipeline Execution is the class of attack in which an actor with write access to source control, but no direct access to the build environment, injects attacker-controlled commands that the CI pipeline then executes with its own privileges, secrets, and tokens. Direct PPE (D-PPE) modifies the CI configuration file itself (for example .github/workflows, .gitlab-ci.yml, or a Jenkinsfile) by pushing to an unprotected branch or opening a pull request, so the new pipeline steps run on trigger. Indirect PPE (I-PPE) instead poisons files the pipeline already references, such as a Makefile, test harness, build script, or linter config, when the config is protected but the referenced code is not. Public PPE (3PE) abuses public and open-source repositories that run unreviewed code from anonymous fork pull requests, frequently via the dangerous pull_request_target trigger that grants the fork workflow access to repository secrets. The pattern is catalogued as CICD-SEC-4 in the OWASP Top 10 CI/CD Security Risks (published September 2022) and in Cider/Legit Security research, with real cases including public-repo PPE in popular projects and GitHub Actions workflows abused for cryptocurrency mining.

Comment l’éviter dans votre code

  • Require review approval before any workflow runs on fork or external-contributor pull requests; never auto-run unreviewed code.
  • Avoid pull_request_target with a checkout of the untrusted PR head; never expose secrets to fork-triggered workflows.
  • Protect branches and the CI config path; mandate reviews and signed commits for pipeline-definition changes.
  • Run untrusted-PR builds on isolated, secret-less, least-privilege runners with restricted egress.
  • Pin and integrity-check the build scripts, Makefiles, and dependencies the pipeline executes.

Références

Vulnérabilités liées

Tout Supply chain →