Your CI pipeline ships code daily. Do you know exactly what is inside the container image? Most teams cannot answer that question without manual digging. An SBOM answers it automatically.
Why SBOMs Belong in the Pipeline
A Software Bill of Materials (SBOM) is a structured inventory of every package, library, and dependency in your artifact. It transforms vague assumptions into verifiable data. Regulators agree: the 2026 CISA attestation requirements and the EU Cyber Resilience Act both mandate SBOMs for critical software. Generating them at build time is the only scalable way to comply.
Add Syft to GitHub Actions
Install the Syft CLI in a workflow step, point it at your built image, and upload the result as an artifact. The following workflow runs on every push to main and tags the SBOM with the git SHA for traceability.
Sign and Verify the SBOM
An unsigned SBOM is a claim, not evidence. Use cosign to sign the generated file with keyless OIDC tokens. The attestation step above publishes a signed in-toto statement to the GitHub Actions transparency log. Downstream consumers verify it with cosign verify-attestation before admitting the image to staging.
Feed the SBOM to Grype
Generation is half the job. Scanning the SBOM for vulnerabilities closes the loop. Grype reads CycloneDX or SPDX directly, so you skip re-scanning the filesystem. Add a second job that downloads the artifact and fails the build on critical findings.
Automate Policy Enforcement
Hard failures on critical CVEs are a start. Mature teams define policy-as-code: allowlist specific CVE IDs with expiration dates, require fix versions for high-severity findings, and block licenses incompatible with distribution. Tools like Kyverno or OPA Gatekeeper enforce these policies at admission time in Kubernetes, using the same SBOM Grype just scanned.
✦
Next Steps
1. Add the workflow above to .github/workflows/sbom.yml.
2. Enable attestations: write permission on the repository.
3. Configure Grype severity thresholds to match your risk appetite.
4. Publish SBOMs to a central catalog for incident response teams.
"An SBOM generated at build time is the only artifact that travels with the software from developer laptop to production cluster.
— Supply Chain Security Practitioner





