Sub topic 1
Why Build Provenance Matters: Threats Between Source and Artifact
Prerequisites
This chapter assumes you understand GitHub Actions jobs, steps, and permissions. You should also know how to use git and the GitHub CLI, and understand that a hash identifies exact artifact bytes.
Threats Between Source and Artifact
A source repository is not the artifact users download. A build process transforms a commit into a binary or container image. Every step between those points can introduce risk:
- An attacker changes the source or selects an unexpected commit.
- A workflow dependency or build tool is compromised.
- A privileged workflow is modified to produce a different artifact.
- A registry tag moves after publication.
- A consumer cannot tell which workflow produced the artifact.
A cryptographic hash identifies an artifact, but it does not explain its origin. Build provenance is signed metadata that connects an artifact digest to its source revision, build process, builder, and dependencies.
> callout note > Provenance improves traceability and verification. It does not prove that the source code is safe or that every dependency is trustworthy.
SLSA in Brief
SLSA, pronounced “salsa,” is a framework for improving software supply-chain integrity. Its tracks describe different parts of the supply chain. The Build track focuses on how source becomes an artifact. The Source track focuses on protecting and verifying source code.
The Build levels indicate increasing guarantees:
| Level | Main promise |
|---|---|
| L0 | No SLSA build requirements |
| L1 | The build produces provenance |
| L2 | A hosted build service generates authenticated provenance |
| L3 | A hardened build platform protects the build process |
The level depends on the complete setup, not only on adding one workflow step.
Anatomy of a Provenance Attestation
An attestation is a signed statement about an artifact. Its subject identifies the artifact by a digest. Its predicate records build details such as the builder, source materials, invocation, and timestamps. The predicate type tells verifiers how to interpret those fields.
flowchart TD
S[Source commit] --> B[Build workflow]
B --> A[Artifact digest]
B --> P[Provenance predicate]
A --> T[Signed attestation]
P --> Tcaption: How a build connects source, process, and artifact alt: A source commit enters a build workflow that produces an artifact digest and provenance predicate, which combine into a signed attestation.
Workflow Identity Through GitHub Actions OIDC
GitHub Actions can issue an OpenID Connect (OIDC) token for a workflow run. The token contains claims about the repository, commit, workflow, and run. A signing service can use those claims to identify the workflow without storing a long-lived private signing key in the repository.
This identity lets a verifier ask not only “Was this digest signed?” but also “Was it signed by the expected repository and workflow?”
Exercise
Why is an artifact digest necessary in provenance?
Show answer
It binds the attestation to exact bytes, preventing a movable tag from silently referring to a different artifact.