ci(release): attach the CycloneDX SBOM to each GitHub Release - #160
Merged
Merged
Conversation
- sbom.yml gains a workflow_call trigger so release.yml reuses the exact steps that run on every PR. - release.yml: a read-only `sbom` job runs first; the release job needs it, downloads the artifact, checks it is for this package and version, and attaches agent-tokenops-<version>.cdx.json to the GitHub Release. If the SBOM fails, nothing is tagged, released or uploaded. The file stays out of dist/ so PyPI only sees the wheel and sdist. - Suppress zizmor's self-repository finding with a reason (see comment). - RELEASING.md: document the new step. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merged
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.
What
The release workflow now attaches a CycloneDX SBOM to every GitHub Release.
sbom.ymlgains aworkflow_calltrigger, sorelease.ymlreuses the exact steps that run on every PR (build wheel, clean venv,cyclonedx-py, schema validation).release.yml: a newsbomjob (contents: readonly) runs first. Thereleasejobneedsit, downloads the artifact, asserts the SBOM is foragent-tokenopsat the version being released, and attachesagent-tokenops-<version>.cdx.jsonto the GitHub Release.dist/, so the PyPI upload only sees the wheel and sdist.RELEASING.mdupdated.Why a separate job
The cyclonedx tooling is installed from PyPI; it stays out of the job that holds
contents: write.Checked
self-repositorysuggests the$/syntax for the reusable-workflow reference;./is the long-standing form and I could not exercise the newer one, because this workflow cannot run in a PR.0.4.0, fails on a version mismatch.sbomjob runs first, so a problem there stops before anything is published.Not in this PR
Version bump / changelog for the release that will carry the first SBOM, SBOM attestation, licence-data fixes.
🤖 Generated with Claude Code