Sub topic 2
SLSA in brief: tracks, Build levels, and what they promise
This chapter assumes you know basic GitHub Actions workflows, what a hash and a digital signature are, and how to publish a binary or container image. It introduces the vocabulary used for the rest of the tutorial. By the end you should be able to say which SLSA Build level a given setup reaches, and why.
What SLSA is
SLSA (pronounced "salsa", short for Supply-chain Levels for Software Artifacts) is a specification for describing how much you can trust the way an artifact was produced. It is not a tool, and you cannot install it. It defines requirements, and tools such as GitHub artifact attestations help you meet them.
SLSA is organized into tracks. Each track covers one part of the supply chain and has its own numbered levels. The current specification defines the Build track, which is about how an artifact is built from source. A Source track, covering how source code is managed, is in development. Everything in this tutorial is about the Build track.
What the Build track promises
The Build track answers one question for a consumer: "Was this artifact really produced by the build process it claims, from the source it claims?" It does this with provenance. Provenance is a signed record of how an artifact was built: which builder ran, from which repository and commit, and with what inputs. The next chapter takes that record apart.
Higher levels do not mean the software is safer. They mean the claims in the provenance are harder to forge.
| Level | Requirement | What it protects against |
|---|---|---|
| Build L0 | No guarantees. | Nothing. |
| Build L1 | The build produces provenance, which may be unsigned and filled in by the build script itself. | Mistakes, and a lack of any record of origin. |
| Build L2 | A hosted build platform generates and signs the provenance. | Forging provenance after the fact, or tampering with the artifact after the build. |
| Build L3 | The platform is hardened so one build cannot influence another, and the signing material is out of reach of user-defined build steps. | Tampering from inside the build, such as a malicious step or a poisoned cache from an earlier run. |
The main change from L1 to L2 is who writes the provenance. At L1 your own script can assert anything. At L2 the platform writes it and signs it, so a consumer can trust the "who built this" part without trusting the build script.
L3 adds isolation. At L2 a compromised build step could still reach the signing mechanism or affect other runs. At L3 the platform prevents that.
Where GitHub Actions fits
GitHub Actions is a hosted build platform, so it can reach the upper levels. The result depends on how you set up the workflow:
- A standard workflow that runs
actions/attest-build-provenanceproduces signed provenance generated by the platform. That meets Build L2. - Build L3 needs a reusable workflow that the build steps cannot tamper with, called from your workflow. A later chapter covers it.
The level describes a specific build setup, not a repository or a project. Two workflows in the same repository can sit at different levels.
What the levels do not promise
It helps to separate three things that are easy to confuse:
- Authenticity. The artifact came from the builder and source the provenance names. SLSA addresses this.
- Integrity. The artifact was not changed after the build. Signed provenance that includes the artifact's digest addresses this.
- Quality. The source code is free of bugs or malicious logic. SLSA does not address this.
If a maintainer commits malicious code and your workflow builds it, the provenance will be valid. It truthfully says that your workflow built that commit. A consumer still has to decide whether to trust that repository and that workflow. The final chapter returns to this limit.
Common mistakes
- Saying "we are SLSA 3" about a whole project. Levels apply to a build process for a given artifact.
- Treating L1 as a security control. Unsigned provenance written by the build script gives you documentation and nothing a consumer can rely on.
- Assuming a higher level means a more trustworthy maintainer. It means a more trustworthy build record.
Exercise
A repository uses a normal GitHub Actions workflow that builds a binary and runs actions/attest-build-provenance. A reviewer says the binary is therefore safe to run. Which Build level does this setup reach, and what is wrong with the reviewer's claim?
Show answer
It reaches Build L2, because the hosted platform generates and signs the provenance. The claim is wrong because provenance proves where and how the binary was built, not that the source code is free of bugs or malicious changes. Reaching L3 would also need an isolated reusable workflow so the build steps cannot tamper with the signing process.