Lesson 10 of 14 · 13m
SLSA: Who Built This, From What
Provenance is a signed in-toto claim about the build — SLSA levels decide whether that claim is worth trusting.
Between the commit and the artifact is a build you didn't watch
git tag v1.4.2 is a statement about source. The .tar.gz your users download is a statement about a build machine, a toolchain, and everything that ran between checkout and upload. xz-utils taught the industry what lives in that gap: the malicious build-to-host.m4 existed only in the tarball. The commit was clean. The artifact was not.
SLSA ("salsa," slsa.dev) is the framework that names this gap and closes it. At its core is one artifact: provenance — a signed attestation, in the in-toto format (predicateType: https://slsa.dev/provenance/v1), that records who built this, from which source at which digest, with which parameters and materials. Not "the build was good" — "here is the signed claim of exactly what happened," verifiable offline.
The levels, concretely
SLSA 1.0 (June 2023) tracks the build in three steps:
- L1 — provenance exists. The build emits a statement of inputs and outputs. Prevents nothing by itself; enables verification.
- L2 — hosted builder. Provenance is generated by a build service (GitHub-hosted runners via the
slsa-github-generatorreusable workflows, for example) rather than your laptop — the signing keys live where your build account can't easily leak them. - L3 — hardened. Isolated, ephemeral builds; provenance covers resolved dependencies; tampering with a single build can't rewrite the claim. Reproducibility heads this direction.
Provenance is not an SBOM and the two pair well: the SBOM says what is in the artifact, the attestation says how it was built and from which source. One is an inventory, the other is a chain of custody. The attestation's subject field binds the claim to the artifact's digest — the check is "these exact bytes came from this build," which is why slsa-verifier compares source-tag, source-uri, and the artifact digest.
Verification is a CLI, not a vibe: slsa-verifier verify-artifact artifact.tgz --provenance-path intoto.jsonl --source-uri github.com/org/repo --source-tag v1.4.2 fails or it doesn't. GitHub's own actions/attest-build-provenance (GA 2024) writes attestations to the repo's attestation store or an OCI registry, and gh attestation verify <artifact> --repo org/repo checks them. npm wired the same idea into publish: npm publish --provenance from GitHub Actions produces a sigstore bundle linking the package version to the exact workflow run — the little "provenance" badge on npmjs.com.
The wrong mental model
"The release is the tag" — as if git archive were the whole pipeline. Every deployed artifact passes through a build environment someone controls: your CI vendor, a self-hosted runner pool, a maintainer's laptop. xz's attacker didn't need to corrupt git because git wasn't the shipping surface. Provenance is the mechanism that makes the shipping surface accountable.
The second trap: provenance as security theater — an attestation that says "built on laptop-7 from commit abc123" is honest but worthless if laptop-7 is unaudited. That's why the levels exist: L1 is table stakes, and the trust lives in who signs. A reusable-workflow builder on hosted infrastructure (L2+) is the difference between "someone claims" and "a system I can verify claims."
Practice
- Build releases on hosted, ephemeral runners — never self-hosted for public-facing releases.
- Emit provenance:
slsa-github-generatorfor Go/generic builds,actions/attest-build-provenancefor anything GitHub,npm publish --provenancefor npm packages. - Gate deploys on verification:
slsa-verifier/gh attestation verifyin the pipeline — an artifact without verifiable provenance doesn't deploy. - Keep the SBOM and the attestation together: the SBOM answers "what's inside," the attestation answers "where it came from" — incident response needs both halves.
The chain is source → build → artifact. Signing the ends and ignoring the middle is exactly where xz lived.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
Buying Time: Package Managers Are Adding Delay as a Security Control
Composer 2.11 shipped a cooldown that refuses to install a version until it has aged. vlt now holds npm publishes until their dependencies actually exist, because 22% of new npm versions land broken. And Ruby Central's reviewers threw out 90% of what an AI scanner flagged.
Your npm Install Just Ran Someone Else's Code: Why Dependency Security Has to Start Before CI
A pull request checkout, a poisoned GitHub Actions cache, and an OIDC token pulled straight out of runner memory. That's how 84 malicious versions of TanStack's packages hit npm in six minutes.
CVE-2025-62718: Critical Axios SSRF Vulnerability Explained
A critical SSRF flaw in Axios was used in a North Korean supply chain attack. Here's what it does and how to patch it today.
What is Supply Chain Security? Dependencies, SBOMs, and the Attack That Hit 2.6 Billion npm Downloads
Your application is only as secure as every package it depends on. In September 2025, attackers compromised 27 npm packages with 2.6 billion weekly downloads by phishing one maintainer.