What is an SBOM, and at which point in the pipeline do you generate it?
BeginnerScenarioSupply Chain Security
Answer
Situation read → An SBOM is an inventory of components in a build artifact. It makes "are we affected by CVE-X" a query instead of an investigation.
What I'd do →
- Generate it from the final image, because that is what ships:
syft app:1.0 -o cyclonedx-json > sbom.cdx.json. - Do it in CI right after the image build, once per release.
- Store it next to the image in the registry as an attestation (
cosign attest --type cyclonedx). - Index SBOMs centrally (Dependency-Track) for continuous matching.
Why → Generating from the built image captures OS packages and copied binaries, not only lockfile entries.
Interview tip → An SBOM is data; value comes from continuous matching against new CVEs.
More on Supply Chain Security
A customer asks for an SBOM for your product. What do you give them?BeginnerHow do you sign container images in GitHub Actions without managing private keys?IntermediateYou signed images in CI. How do you make sure the cluster only runs signed images?IntermediateLeadership wants "SLSA compliance". What do you propose?IntermediateWhat is typosquatting and how do you protect developers from it?BeginnerYour internal package `acme-utils` exists in a private registry. How do you prevent dependency confusion?Advanced