chore: generate and attach CycloneDX SBOM to every release#20
Merged
Conversation
SINENSIA
approved these changes
May 10, 2026
This was referenced May 10, 2026
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.
Summary
.github/workflows/sbom.yml. Triggers onrelease: published(plusworkflow_dispatchfor backfilling existing releases).@cyclonedx/cyclonedx-npm --omit devand uploadssbom.cdx.jsonas a release asset.npm run sbomscript — same command, runnable locally so consumers and audits can reproduce the artefact.@cyclonedx/cyclonedx-npmadded as a devDependency (pinned via the lockfile).sbom.cdx.jsonadded to.gitignore.Why
Compliance regimes (SLSA, EO 14028, EU CRA drafts) increasingly expect a verifiable list of every transitive dependency that ships in an artefact. Attaching the SBOM at release time means consumers can diff it across versions to spot supply-chain changes without re-running
npm ls.Notes
cyclonedx-npmrather than the more genericcyclonedx-clibecause it parsespackage-lock.jsonnatively and produces a tighter SBOM. Output validated locally: CycloneDX 1.6, 102 production components.--clobberongh release uploadso re-running it (via the manualworkflow_dispatchfor an older release) replaces the existing asset rather than failing.Actions → SBOM → Run workflow → tag: v2.2.0(etc.).Test plan
npm run sbomproduces a validsbom.cdx.json(CycloneDX 1.6, 102 components, dev deps excluded).npm test— 48/48 still passing (no runtime change).v2.2.0to backfill that release. Future releases attach automatically.