Software Supply Chain Security

Protect the path from source to production with SBOMs, signed artifacts, provenance attestations and hardened build systems.

Advanced · about 5 hours · difficulty 4/5

Learn first: Shift-Left Security: SAST, SCA and DAST, Artifact and Package Management

Attackers increasingly target the build pipeline rather than the application: compromised dependencies, poisoned CI actions, stolen publishing tokens, tampered images. Supply chain security makes every artifact traceable and verifiable.

Know what you ship: SBOMs

A software bill of materials lists every component and version inside an artifact, in SPDX or CycloneDX format. Generate one per build (Syft, Trivy, BuildKit attestations), store it with the artifact, and scan it when new CVEs are announced.

Prove where it came from: signing and provenance

  • Sigstore Cosign signs container images and other artifacts. Keyless signing uses the CI system's OIDC identity, so there are no long-lived keys to leak.
  • Provenance attestations record which repo, commit and workflow built an artifact.
  • SLSA (Supply-chain Levels for Software Artifacts) defines levels of build integrity, from "provenance exists" up to hardened, isolated builders.

Enforce at deploy time

Admission controllers such as Kyverno, the Sigstore policy controller or cloud equivalents reject images that are unsigned, unscanned or built outside your pipeline.

Harden the pipeline itself

  • Pin dependencies with lockfiles and CI actions to commit SHAs.
  • Use proxy registries so builds do not pull directly from the public internet.
  • Give CI jobs minimal permissions and short-lived tokens; protect release branches and tags.
  • Require reviews for pipeline changes, since the pipeline is production.
  • Beware typosquatting and dependency confusion between public and private package names.

Good enough to move on: you can produce an SBOM and a keyless Cosign signature for every image your pipeline builds, verify both, and block unsigned images from a cluster.

Key concepts

  • Supply chain attack examples
  • SBOMs: SPDX and CycloneDX
  • Cosign and keyless signing
  • Provenance and SLSA levels
  • Admission-time verification
  • Pinning, lockfiles and proxy registries
  • Dependency confusion and typosquatting

Mini project

Extend your CI pipeline to generate an SBOM with Syft, sign the image and attach the SBOM with keyless Cosign, and configure a Kyverno policy so the cluster only runs images signed by your workflow.

Check yourself

What does keyless signing use instead of a private key, and why does that reduce risk?

Free resources