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
More on Governance, migration, automation and cost
How do you migrate 200 repos from Bitbucket or GitLab to GitHub with minimal disruption?IntermediateWhat does a migration from SVN (or a legacy monolith repo) to Git need beyond the conversion?AdvancedWhat standard files should every repo have?BeginnerHow do you manage GitHub organisation settings as code?IntermediateWhat is InnerSource and how does Git workflow support it?IntermediateWhen do you use DCO versus CLA?Beginner