Software supply-chain compromise: where builds get tampered with
Supply-chain attacks target the path from source to shipped artifact: repositories, dependencies, build systems, and registries. A map of those points with the SLSA framework and the controls for each.
Diagram
Tamper points from commit to deploy
Step 1 of 4
Source
Unreviewed commits or stolen developer credentials.
# Source # Unreviewed commits or stolen developer credentials.
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Build provenance
- What fails
- Without provenance, nobody can prove which source and workflow made an artifact.
- Who is affected
- Everyone who deploys it.
- What you would notice
- Artifacts with no attestation.
- What you change
- Generate SLSA provenance in CI and verify it at deploy.
Workflow changes
- What fails
- CI configuration is code with production access.
- Who is affected
- Every secret and environment the pipeline can reach.
- What you would notice
- Workflow edits merged without review.
- What you change
- Require code-owner review for CI files.
Third-party actions
- What fails
- Actions referenced by tag can change under you.
- Who is affected
- Pipelines using them.
- What you would notice
- uses: org/action@v3 with no SHA pin.
- What you change
- Pin actions to commit SHAs and update with a bot.
SLSA levels in brief
SLSA (Supply-chain Levels for Software Artifacts) defines build levels. Level 1 means provenance exists. Level 2 means it is signed by a hosted build platform. Level 3 means the build runs isolated so even the project’s own workflows cannot forge provenance. Most teams can reach Level 2 quickly with GitHub or GitLab attestations.
Lessons from public incidents
The SolarWinds build compromise (2020), the Codecov bash uploader change (2021), and the xz-utils backdoor (2024) each hit a different stage: build system, distribution script, and maintainer trust. Reading their post-incident reports is a good way to test your own controls stage by stage.
Check yourself
Recognition and the fix. Nothing here is a procedure.
A workflow file gained a curl | bash step merged without review. Which control was missing?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.
- 01Pull requests from outside the trust boundaryCode from a fork or an untrusted branch is not your code yet.
- 02Dependency confusion: when a public package shadows a private oneIf a build can pull from public and private registries, a public package with your internal name and a higher version may win.
- 03Typosquatted packages: one wrong letter in an install commandTyposquats copy popular package names with small changes to catch mistyped installs.