[AAASM-3723] 🐛 (ci): Fix CycloneDX SBOM npm-ls tree check in release-node.yml#194
Conversation
The CycloneDX SBOM step (AAASM-3619) ran bare cyclonedx-npm, which shells out to `npm ls` to walk the dependency tree. This repo installs with `pnpm install --frozen-lockfile`, so node_modules is pnpm's symlinked layout with no package-lock.json; npm ls flags devDependencies of transitive deps (safe-publish-latest req by math-intrinsics, @arethetypeswrong/cli req by dunder-proto) as missing and exits 254, aborting the release before publish. Add --omit dev (production-only tree, the right scope for a release SBOM) and --ignore-npm-errors (tolerate residual pnpm-layout npm-ls noise). SBOM generation is independent of the OIDC trusted-publish / SLSA provenance path, which is untouched. Closes AAASM-3723 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
✅ Claude Code review — AAASM-3723 (node SBOM/npm-ls)CI: all green — napi-build, test (18/20/22/24), module-smoke, quality, audit, CodeQL, SonarCloud, codecov/patch, coverage-and-analysis (17 pass / 0 fail). No acceptance-type failures. Scope vs ticket: fixes the Really fixes the release error? Yes — re-ran the beta.5 dry-run on this branch (run 28152672806) and the Verdict: ✅ Ready to approve & merge. |



Description
Fixes the node beta.5 release dry-run failure (run 28152202879). The failing step was Generate CycloneDX SBOM (inside the publish job), not the publish/provenance itself:
Root cause: the job installs with
pnpm install --frozen-lockfile(pnpm's symlinkednode_modules, nopackage-lock.json).@cyclonedx/cyclonedx-npmshells out tonpm lsto walk the tree, which flags devDependencies of transitive deps (e.g.safe-publish-latestrequired bymath-intrinsics) as "missing" and exits non-zero — aborting the release before publish.Fix:
pnpm dlx @cyclonedx/cyclonedx-npm --omit dev --ignore-npm-errors …— a production-only tree (the correct scope for a release SBOM) plus tolerance for the residualnpm lsnoise from pnpm's layout. This is purely the dependency-manifest step; the OIDC trusted-publish + SLSA provenance path is untouched.Verified: re-ran the dry-run on this branch — the publish job is
completed:success(run 28152672806); docs snapshot correctly skipped; nothing published.Type of Change
Related Issues
🤖 Generated with Claude Code