feat(release): attest SBOM + vulnerability scan to the source release#464
Merged
Conversation
The source-germane security evidence belongs on the package, not only on a container image. release.yml now generates a CycloneDX SBOM and a Grype vulnerability scan of the source and attests both to the bundle digest alongside SLSA provenance — three predicates, all signed by release.yml: - https://slsa.dev/provenance/v1 (how it was built) - https://cyclonedx.org/bom (declared dependencies) - https://in-toto.io/attestation/vulns/v0.1 (vulnerability scan; read the verdict) SBOM/scan run on the pristine checkout (before the tarball exists, so Syft does not catalog the archive). The fail-closed self-verify now checks all three predicates. sbom.cdx.json and grype.json are attached to the Release. RELEASING.md updated with the per-predicate verify commands. Pins reuse the repo's existing anchore/sbom-action, anchore/scan-action, and actions/attest SHAs. actionlint clean.
The multi-predicate verify rewrite kept the old single-predicate loop trailing exit 1. After all three predicates verify, control fell through to it, so the step failed every release run despite success. Replace with a success echo; the per-predicate inner exit 1 still fails closed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
You flagged that most of the security checks are germane to the package/source, not only a container image — correct. This wires the minimum you asked for (SBOM and vuln) onto the source release.
release.ymlnow attests three predicates to the release bundle digest, all signed byrelease.yml:https://slsa.dev/provenance/v1https://cyclonedx.org/bomhttps://in-toto.io/attestation/vulns/v0.1sbom.cdx.jsonandgrype.jsonare attached to the Release.RELEASING.mdupdated with per-predicate verify commands and the package-vs-container framing.Type of Change
Test Plan
actionlintclean onrelease.ymlv0.1.1) after mergeChecklist
id-token/attestations: write)RELEASING.md)