ci: add SBOM generation and artifact attestations to releases#80
Conversation
Add Sigstore-signed build provenance and SBOM attestations to the build workflow. Tag-push releases now include: - SLSA build provenance attestation (verifiable with gh attestation verify) - SPDX SBOM generation and attestation - SBOM uploaded as a release asset
📝 WalkthroughWalkthroughThe workflow configuration expands job permissions and adds security artifact generation for tag-triggered releases. It now generates an SPDX JSON SBOM, creates build provenance and SBOM attestations using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/build.yaml (1)
26-29: Scope elevated permissions to a release-only job.Line 28 and Line 29 expand privileges for all
buildjob executions. Consider moving attestation/release steps into a separate tag-only job so non-release runs don’t carryid-token: writeandattestations: write.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build.yaml around lines 26 - 29, The build job currently grants elevated permissions (id-token: write and attestations: write) under the permissions block, which should be limited to release/tag runs; create a new job (e.g., release or attest) that is triggered only on tag events and move the id-token: write and attestations: write permissions and any attestation/release steps into that job, while keeping the existing build job's permissions minimal (remove id-token and attestations from build and leave only what it needs, e.g., contents: write or read) so non-release runs do not carry elevated privileges.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/build.yaml:
- Around line 26-29: The build job currently grants elevated permissions
(id-token: write and attestations: write) under the permissions block, which
should be limited to release/tag runs; create a new job (e.g., release or
attest) that is triggered only on tag events and move the id-token: write and
attestations: write permissions and any attestation/release steps into that job,
while keeping the existing build job's permissions minimal (remove id-token and
attestations from build and leave only what it needs, e.g., contents: write or
read) so non-release runs do not carry elevated privileges.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 29eef547-0ca1-4712-8f40-7e9b5a6d1d0d
📒 Files selected for processing (1)
.github/workflows/build.yaml
Summary
gh attestation verifySummary by CodeRabbit