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.

Lesson 16 of 26 · 12 min read · practice only with authorization

Diagram

Tamper points from commit to deploy

Follow the path. One example at a time.

Step 1 of 4

Source

Unreviewed commits or stolen developer credentials.

Illustration: Source
# 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.

  1. 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.
  2. 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.
  3. 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.

1 / 3

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.

  1. MapBuild pipelines and the software supply chainThe build is an environment with production rights.
  1. 01Pull requests from outside the trust boundaryCode from a fork or an untrusted branch is not your code yet.
  2. 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.
  3. 03Typosquatted packages: one wrong letter in an install commandTyposquats copy popular package names with small changes to catch mistyped installs.

Practice

  1. LabTerminal mission: A build change from someone not on the teamA release build began downloading a script at build time. Review the authors in recent history, find the commit from outside the team, and read exactly what it added to the Makefile.

Glossary

  1. CardSupply-chain compromiseA trusted dependency, build plugin, or vendor update carries a change you did not write.