Interview Prep/Git & GitHub/Governance, migration, automation and cost

How do you produce and keep an SBOM tied to a commit?

AdvancedProductionGovernance, migration, automation and cost
Answer

Generate it in the build (Syft, cyclonedx plugins), attach it as a build attestation or release asset and store it with the image digest. GitHub's dependency graph also exports an SPDX SBOM through the API for a repo snapshot.

syft ghcr.io/org/app@sha256:... -o spdx-json > sbom.spdx.json
gh api repos/ORG/REPO/dependency-graph/sbom
All Git & GitHub questions Roadmap: Git & GitHub

More on Governance, migration, automation and cost