What is an SBOM and why do you generate one in CI?
BeginnerProductionSupply Chain and Pipeline Security
Answer
A Software Bill of Materials lists the components (libraries, versions, licences) in an artifact, in a standard format: CycloneDX or SPDX. With it you can answer "are we affected by CVE-X?" in minutes. Generate it at build time from the actual artifact and publish it with the image.
syft ghcr.io/acme/shop-api:1.7.0 -o cyclonedx-json > sbom.cdx.json
trivy image --format cyclonedx --output sbom.cdx.json ghcr.io/acme/shop-api:1.7.0
grype sbom:./sbom.cdx.json --fail-on high
More on Supply Chain and Pipeline Security
What is a software supply chain attack, and where does the pipeline fit?BeginnerHow do you sign container images and verify them at deploy time?IntermediateWhat is SLSA and which level should a typical team aim for?IntermediateHow do you verify provenance before deploying?AdvancedHow do you scan images and dependencies in the pipeline without drowning in noise?IntermediateHow do you prevent dependency confusion and typosquatting in build pipelines?Advanced