How it works
The explanation, with examples you can run.
SBOM: the list of ingredients
A software bill of materials lists every component in an artifact, with versions and usually licences and package URLs. The two common formats are SPDX and CycloneDX; tools such as Syft, Trivy or your build tool's plugin generate them. Store an SBOM next to every release. When the next big vulnerability lands, you search SBOMs instead of guessing which images use the affected library.
Provenance and SLSA
Provenance is a signed statement: "the artifact with digest sha256:abc… was built from commit 123… of my-org/my-app by this workflow on this platform". SLSA (Supply-chain Levels for Software Artifacts) defines levels for it. In the current spec (v1.2) the Build track has four:
- L0: no guarantees.
- L1: provenance exists. Good for catching mistakes, but easy to forge.
- L2: provenance is signed and generated by a hosted build platform, so forging it takes a deliberate attack.
- L3: a hardened platform that isolates builds from each other and keeps signing keys away from user-defined steps, so forging provenance needs an exploit most attackers don't have.
v1.2 also adds a Source track for how the source itself is protected (reviews, branch protection, history).
Signing with Sigstore
Traditional signing means guarding a private key for years. Sigstore's keyless approach replaces it with identity. The signer (a person, or a CI job through OIDC) gets a certificate valid for about ten minutes from Fulcio, signs, and the signature is recorded in Rekor, a public append-only transparency log. Verifiers check that the certificate names the identity they expect, for example "the release workflow of my-org/my-app on main", and that the entry is in the log. cosign is the usual client for container images.
In GitHub Actions
GitHub's artifact attestations generate SLSA provenance and sign it with Sigstore:
jobs: build: runs-on: ubuntu-latest permissions: contents: read id-token: write # to get a signing certificate attestations: write # to store the attestation artifact-metadata: write steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - run: make dist # produces dist/app.tgz - uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 # v4.2.2 with: subject-path: dist/app.tgzConsumers then check it before deploying:
gh attestation verify dist/app.tgz --repo my-org/my-appPassing sbom-path instead attests an SBOM. The real value comes from verifying at deploy time: an admission policy that rejects images without valid provenance from your build workflow turns all of this from paperwork into a gate.
Check yourself
3 questions. Get them all right to finish this topic.
0 of 3 right so far. Get all three to finish this topic.