SLSA Supply Chain Levels: Enterprise Technical Guide
Prerequisites
- Familiarity with CI/CD pipelines
- Basic understanding of container images and signing
Steps
SLSA supply chain levels help enterprises measure and harden software provenance from source to artifact. This guide explains the architecture, implementation path, and operational controls needed to adopt SLSA in production CI/CD.
Overview — What SLSA supply chain levels is, core purpose, and why enterprises use it
SLSA (Supply-chain Levels for Software Artifacts) is a framework for defining and measuring software supply chain integrity. It gives enterprises a practical maturity model for reducing the risk of tampering, dependency poisoning, and artifact substitution across build and release pipelines.
Enterprises use SLSA to standardize controls across teams and vendors, especially when software is built in distributed CI/CD systems. The goal is to reach verifiable provenance: every artifact should be traceable to a trusted source, a controlled build process, and a signed attestation.
Architecture — Core components, deployment models, data flow
Core components include source control, build system, signing service, provenance store, artifact registry, and policy engine. In mature deployments, the build platform emits attestations, the signing system binds identity to artifacts, and admission controls verify provenance before deployment.
View as text
[Developer] ---- 1. commit ----> [Git Repo] ---- 2. trigger ----> [CI Runner] [CI Runner] ---- 3. build ----> [Artifact] ---- 4. sign ----> [KMS/HSM] [CI Runner] ---- 5. attest ----> [Provenance Store] ---- 6. verify ----> [Policy Engine] [Policy Engine] ---- 7. allow/deny ----> [Kubernetes / Runtime]
Common deployment models:
- Centralized CI with managed runners for strict control.
- Federated CI across business units with shared provenance policy.
- Multi-cloud builds where attestations are stored in an OCI registry or transparency log.
Implementation Guide — Step-by-step setup with exact CLI commands and config files
- Enable a trusted build identity and isolate runners.
- Generate signed provenance for each build.
- Store attestations with the artifact.
- Enforce verification at deploy time.
Example setup with GitHub Actions, cosign, and Rekor:
export COSIGN_EXPERIMENTAL=1
cosign generate-key-pair
cosign sign --key cosign.key ghcr.io/acme/payments:1.2.3
cosign attest --key cosign.key --predicate provenance.json --type slsaprovenance ghcr.io/acme/payments:1.2.3
Example workflow snippet:
name: build-sign-attest
on: [push]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- run: docker build -t ghcr.io/acme/payments:${{ github.sha }} .
- uses: sigstore/cosign-installer@v3
- run: cosign sign --yes ghcr.io/acme/payments:${{ github.sha }}
Code Examples — 3 practical examples in fenced code blocks
# Verify an image before deployment
cosign verify --key cosign.pub ghcr.io/acme/payments:1.2.3
# Kubernetes admission policy example
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: require-slsa-provenance
spec:
validationFailureAction: Enforce
rules:
- name: verify-image
match:
resources:
kinds:
- Pod
verifyImages:
- imageReferences:
- "ghcr.io/acme/*"
attestors:
- entries:
- keyless:
issuer: "https://token.actions.githubusercontent.com"
subject: "repo:acme/payments:*"
import json
from pathlib import Path
prov = json.loads(Path("provenance.json").read_text())
assert prov["predicateType"].endswith("slsa/provenance/v1")
print("Provenance schema valid")
Security Hardening — Best practices, encryption, access control
- Use short-lived OIDC identities instead of long-lived secrets.
- Store signing keys in KMS or HSM and restrict access with least privilege.
- Encrypt provenance at rest and in transit; enable TLS for registry and log access.
- Pin build dependencies and use hermetic builds where possible.
- Separate duties: developers commit code, CI builds, release automation signs.
Comparison — Markdown table: SLSA supply chain levels vs 2 real named competitors on pricing, deployment, scalability, security
| Framework | Pricing | Deployment | Scalability | Security |
|---|---|---|---|---|
| SLSA | Open standard; implementation cost depends on tooling | Works across GitHub Actions, GitLab, Jenkins, Tekton | High for enterprise CI/CD estates | Strong provenance and build integrity controls |
| in-toto | Open source; no license cost | Requires more custom policy and metadata wiring | High, but more integration effort | Strong step-level supply chain metadata |
| Sigstore | Open source; managed trust services available | Easy for signing and verification workflows | High for multi-team adoption | Strong artifact signing and transparency logging |
Troubleshooting — 3 common errors with actual log samples and concise fixes
- Missing OIDC permissions:
ERROR: failed to obtain identity token: permission "id-token: write" is required
Fix: add permissions: id-token: write to the workflow job.
- Verification failure due to issuer mismatch:
Error: no matching certificate identity found for issuer https://token.actions.githubusercontent.com
Fix: confirm the issuer and subject constraints match the CI provider and repository.
- Signature not found in registry:
ERROR: no matching signatures found for ghcr.io/acme/payments:1.2.3
Fix: ensure the image was signed after push and that the verifier can reach the registry and transparency log.
Best Practices — Do's and don'ts with concrete examples
- Do enforce provenance at admission time; for example, block pods without verified attestations.
- Do version and archive build definitions alongside application code.
- Do require immutable tags and digest-pinned deployments like
image@sha256:.... - Don't allow ad hoc local builds to go directly to production.
- Don't reuse signing keys across environments; use separate trust domains for dev, staging, and prod.
SLSA adoption is most effective when treated as a platform capability, not a one-off compliance task. Start with signed provenance for critical services, then expand to policy enforcement and higher SLSA maturity levels across the enterprise.
Have a project in mind?
Get an instant AI price estimate for it, or talk directly to our team.
One email a month on what we learn building with AI