|
| 1 | +--- |
| 2 | +title: "Lab: Container Image Attestations" |
| 3 | +linkTitle: "Lab: Container Image Attestations" |
| 4 | +description: | |
| 5 | + Learn to attach SBOMs, build provenance, image signatures, and VEX |
| 6 | + statements to container images for a verifiable software supply chain. |
| 7 | +summary: | |
| 8 | + Hands-on lab: Add supply chain metadata to a container image. Generate |
| 9 | + SBOMs and SLSA provenance with BuildKit, sign images with Cosign, and |
| 10 | + attach OpenVEX statements to declare vulnerability exploitability status. |
| 11 | +keywords: Docker, supply chain, SBOM, provenance, SLSA, Cosign, VEX, attestations, security, lab, labspace |
| 12 | +params: |
| 13 | + tags: [labs] |
| 14 | + time: 45 minutes |
| 15 | + resource_links: |
| 16 | + - title: Build attestations |
| 17 | + url: /build/metadata/attestations/ |
| 18 | + - title: SBOM attestations |
| 19 | + url: /build/metadata/attestations/sbom/ |
| 20 | + - title: Provenance attestations |
| 21 | + url: /build/metadata/attestations/slsa-provenance/ |
| 22 | + - title: Labspace repository |
| 23 | + url: https://github.com/dockersamples/labspace-attestation-basics |
| 24 | +--- |
| 25 | + |
| 26 | +Prove where your container images came from and that they haven't been |
| 27 | +tampered with. This lab walks through generating SBOMs and SLSA build |
| 28 | +provenance with BuildKit, signing images with Cosign, and writing VEX |
| 29 | +statements to declare which CVEs affect your image — the techniques used |
| 30 | +to meet supply chain security requirements like NIST SSDF and EO 14028. |
| 31 | + |
| 32 | +## Launch the lab |
| 33 | + |
| 34 | +{{< labspace-launch image="dockersamples/labspace-attestation-basics" >}} |
| 35 | + |
| 36 | +## What you'll learn |
| 37 | + |
| 38 | +By the end of this Labspace, you will have completed the following: |
| 39 | + |
| 40 | +- Generate and inspect an SPDX SBOM attached to a container image with `--sbom=true` |
| 41 | +- Generate SLSA build provenance with `--provenance=mode=max` and understand how multi-stage builds are fully recorded |
| 42 | +- Install Cosign and use key-based signing to sign and verify a container image |
| 43 | +- Write an OpenVEX statement to declare CVE exploitability status and attach it as a signed attestation |
| 44 | +- Understand how SBOMs, provenance, signatures, and VEX complement each other in a complete supply chain story |
| 45 | + |
| 46 | +## Modules |
| 47 | + |
| 48 | +| # | Module | Description | |
| 49 | +| --- | --------------------------------- | ------------------------------------------------------------------------------------ | |
| 50 | +| 1 | Introduction | Overview of supply chain attestations and the sample Go app | |
| 51 | +| 2 | Software Bill of Materials (SBOM) | Build with `--sbom=true`, inspect SPDX contents, and understand scanner integration | |
| 52 | +| 3 | Build Provenance | Generate SLSA provenance and explore how multi-stage builds are recorded | |
| 53 | +| 4 | Signing Images with Cosign | Generate a key pair, sign the image, verify the signature, and learn keyless signing | |
| 54 | +| 5 | VEX Statements | Scan for CVEs, write an OpenVEX document, and attach it as a signed attestation | |
| 55 | +| 6 | Bringing It All Together | Run the complete build-sign-attest workflow and see the full supply chain picture | |
| 56 | +| 7 | Recap | Summary of skills and next steps for policy enforcement and higher SLSA levels | |
0 commit comments