fix: invoke cyclonedx-npm via npx so SBOM workflow can backfill old tags#22
Merged
Conversation
SINENSIA
approved these changes
May 10, 2026
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
Replaces the
npm run sbomstep in.github/workflows/sbom.ymlwith a directnpx --yes @cyclonedx/cyclonedx-npm@^4 ...invocation. The local script inpackage.jsonstays for developer use.Why
The workflow runs against an arbitrary tag (the just-published release on
release: published, or whatever the operator passes toworkflow_dispatch). Tags older than #20 don't have thesbomnpm script, so the workflow fails withnpm error Missing script: "sbom"(run 25640979470 reproduced this againstv2.2.0).By bringing the tool in via
npx, the workflow no longer depends on anything inside the checked-out tag beyondpackage.json/package-lock.json(used bynpm cifornode_modules). It now works forv2.0.0onward.Notes
mainand is read from there forworkflow_dispatch, and from the tag itself forrelease: published. Once this merges,v2.4.0and beyond will use the fixed file automatically; forrelease: publishedagainstv2.3.0we already attached the SBOM successfully (the v2.3.0 tag includes the old workflow, which works because v2.3.0 does have the script).Test plan
v2.2.0and confirm the SBOM is attached. Then repeat forv2.1.0andv2.0.0.