SSOGEN / Learn / Software Supply Chain Security: Six Steps, Six Real Attacks

Learn

Software Supply Chain Security: Six Steps, Six Real Attacks

Protecting every step from commit to production (source, dependencies, pipeline credentials, build and registry) is called software supply chain security. An attacker who tampers with any one ships code inside your release, signed and published under your name.

An overhead view of sealed crates on a conveyor past six stations to an inspection arch; one crate has a red band
The gate at the end checks what the six steps produced.

Each step below was attacked in public, on a known date, with a CVE or advisory behind it, and each has a control that stops it.

Six steps from commit to production

Commit to production, attacked at every step

Steps 1 to 4 feed the build; steps 5 and 6 carry its output to the deploy gate

1. SourceGit repository, release tarballxz-utils, 2024
2. DependenciesPublic and private package indexestorchtriton, 2022
3. Pipeline codeWorkflow files, third-party actionstj-actions, 2025
4. CI credentialsTokens and keys the job holdsCodecov, 2021
compile
5. BuildThe server that compilesSolarWinds, 2020
publish
6. Registrynpm, PyPI, image registryShai-Hulud, 2025
pull
Deploy gateChecks signature and signer
The gate at the end checks what the six steps produced.
Step Attack and date What the attacker changed Control that stops it
1. Source xz-utils, CVE-2024-3094, disclosed March 29, 2024 The 5.6.0 and 5.6.1 release tarballs carried a line in build-to-host.m4 that the Git source lacks. During the build it extracted an object file from a disguised test file, which modified liblzma. Build from the tagged commit, not the maintainer’s tarball, or compare the two first.
2. Dependencies torchtriton on PyTorch nightly, Linux, pip, December 25 to 30, 2022 A package with the name of PyTorch’s own was uploaded to PyPI. pip preferred PyPI, and the binary uploaded system data and environment variables. Pin every dependency with a hash (pip install --require-hashes, npm ci) and resolve each package name from one index.
3. Pipeline code tj-actions/changed-files, CVE-2025-30066, March 14 and 15, 2025 Tags v1 to v45.0.7 were moved to commit 0e58ed8, whose code exposed CI secrets in the Actions logs. Lock workflow dependencies with GitHub’s lockfile, or pin each action to a full-length commit SHA. A tag can move; a SHA cannot.
4. CI credentials Codecov Bash Uploader, altered from January 31, 2021, fixed April 1, 2021 The modified script sent the secrets in customers’ CI environments to a server outside Codecov. Hold no stored cloud keys in CI: OIDC federation gives each job a short-lived token. Check downloaded scripts against their published checksum.
5. Build SolarWinds Orion 2019.4 to 2020.2.1 HF1; CISA Emergency Directive 21-01, December 13, 2020 The SUNSPOT implant watched for MsBuild.exe on the build server and swapped InventoryManager.cs for a copy carrying SUNBURST during compilation. SLSA Build L3: a hardened, hosted builder that isolates runs and keeps the signing key out of build steps.
6. Registry Shai-Hulud npm worm, September 2025; CISA alert September 23, 2025 The worm stole developer tokens and used each victim’s npm token to publish infected versions of their other packages. Over 500 packages were hit. Trusted publishing over OIDC, with no long-lived npm token, plus phishing-resistant MFA on developer accounts.

The gate checks the result. cosign verify with --certificate-identity and --certificate-oidc-issuer refuses an image unless the expected identity, from the expected OIDC issuer, signed it.

Provenance: proof of which builder made the artifact

Provenance records which builder made a package and from which inputs. SLSA v1.2 grades it in build levels, each stopping a different attack.

  • Build L1: provenance exists. The builder records who built the package, the build process and the top-level inputs. It catches mistakes but is trivial to forge.
  • Build L2: hosted, signed. A hosted build service generates and signs the provenance itself. Tampering after the build breaks the signature.
  • Build L3: hardened builder. Runs cannot influence one another, and user-defined build steps cannot reach the signing key. This level stops a SUNSPOT-style swap during the build.

npm does this with trusted publishing from GitHub Actions or GitLab CI/CD. Sigstore signs it and records it in a public transparency log. Consumers check it with one command (output from npm’s documentation).

Verify registry signatures and provenance in a project
$ npm audit signatures
audited 1267 packages in 6s
1267 packages have verified registry signatures
74 packages have verified attestations

The pipeline’s own credentials

A CI job should hold no key that outlives the job. Codecov shows why: the altered script read whatever the runner held. A customer caught it on April 1, 2021: the downloaded script’s checksum did not match the published one.

Before: a stored cloud key. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY sit in repository secrets for months. Every step in the job can read them, including a third-party uploader script. A copy works from anywhere until someone rotates it.

After: a token for one job. The cloud trusts the issuer https://token.actions.githubusercontent.com only when the sub claim equals repo:acme/payments:ref:refs/heads/main. The job exchanges that claim for a short-lived token, and nothing long-lived is stored.

Repositories created after July 15, 2026 get an immutable sub with owner and repository IDs, so write the rule for that format. The exchange for three clouds is on workload identity federation. For keys that already leaked into a repository, start with secret scanning.

What an SBOM answers after an incident

An SBOM turns “are we affected?” into a lookup.

  • xz 5.6.0 or 5.6.1 in our products: SBOM. Search every SBOM for xz at those two versions.
  • A Shai-Hulud version in our dependencies: lockfile and SBOM. CISA told teams to check package-lock.json and yarn.lock, nested dependencies included.

Formats and fields are covered on what an SBOM is.

Machine identities in SSOGEN

Step 4 is one case of a wider rule: software that calls other systems needs its own identity, a short-lived credential and a person who answers for it. SSOGEN registers such software as non-human identities of four types: AI agent, MCP client, Automation and Service.

  • An owner and an end date. Each identity has up to five owners, all people. When the last owner leaves, SSOGEN suspends it. Expires on and Review by dates are at most 365 days ahead.
  • A key pair, never a password. You register the public key and the identity keeps the private key. SSOGEN refuses a registration that contains a private key. Each token is bound to that key and lives about four minutes.
  • Every token on record. The audit trail records each token issued or refused.

How these identities differ from user accounts is on non-human identity.

Supply chain questions from security reviews

What does supply chain integrity mean for software?

It means the artifact you run is exactly what your source and declared dependencies produce, with nothing added. Three records prove it: a lockfile with hashes, signed provenance naming the builder and the commit, and a signature checked at deploy. The xz tarballs failed the first test: they differed from the Git source.

Which frameworks cover software supply chain security?

Three frameworks cover it: NIST’s SSDF (SP 800-218, version 1.1, February 2022), SLSA and CISA’s attestation form. SLSA v1.2 grades a build and its provenance in levels L0 to L3. With the CISA form, a producer attests to selected SSDF practices. Under OMB M-26-05 (January 23, 2026), federal agencies may use the form and ask for an SBOM.

What is the difference between an SBOM and SLSA provenance?

An SBOM lists what is inside an artifact; provenance records where and how the artifact was built. An SBOM tells you whether you ship xz 5.6.1. Provenance tells you whether your hosted builder made the file from the commit you expected. From Build L2 upward, signed provenance shows tampering after the build; an SBOM does not.

What is a dependency confusion attack?

An attacker publishes a package on a public index under a private package’s name, so the resolver installs the attacker’s copy. The PyTorch nightly case in December 2022 worked because pip preferred PyPI over PyTorch’s own index. Hash pinning stops it, and so does resolving each package name from exactly one index.

Sources, all read 2026-11-18:

Updated