Repository navigation
feat(release): publish a CycloneDX SBOM per VSIX - #207
Open
clement-tourriere wants to merge 2 commits into
Open
clement-tourriere wants to merge 2 commits into
clement-tourriere wants to merge 2 commits into
Conversation
Customers ask for an SBOM covering what the extension ships, ggshield included. scripts/generate-sbom.mjs builds one per target from: - the npm packages esbuild bundled into dist/extension.js, read from the metafile production builds now write (none today); - ggshield, with the components of the SBOM its release publishes for the matching target nested under it. The build job generates gitguardian-<target>.cdx.json next to each VSIX and the release attaches them to the GitHub release. The build fails if the pinned ggshield release has no SBOM, so ggshield_version must point to a release that publishes them before this is merged. Refs: END-1305
The pinned ggshield 1.56.0 publishes no SBOM, so every PR build failed. PR and main builds now skip the extension SBOM with a warning when the ggshield release has none; release builds still fail without it, before anything is published. Refs: END-1305
clement-tourriere
force-pushed
the
ctourriere/END-1305/publish_sbom
branch
from
October 22, 2026 12:57
84ec847 to
7019ebf
Compare
This branch has not been deployed
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.
Context
clients asked for an SBOM covering the components of the released extension, ggshield included (END-1305, from END-1066).
This PR depends on GitGuardian/ggshield#1577, which adds
ggshield-<version>-<target>.cdx.jsonto ggshield releases. The pinned ggshield 1.56.0 has none. Untilggshield_versionpoints to a release that does, PR and main builds skip the extension SBOM and show a warning. Release builds still fail without it, so the next extension release needs a ggshield release with SBOMs first.What has been done
scripts/generate-sbom.mjsbuilds a CycloneDX 1.5 SBOM per VSIX target. It contains:dist/extension.js, read from the metafile production builds now write (dist/esbuild-meta.json, excluded from the VSIX). Today there are none: onlysrc/is bundled;build.yamlgeneratesgitguardian-<target>.cdx.jsonand uploads it as an artifact. Itsrequire-sbominput, whichrelease.yamlsets, makes a missing ggshield SBOM fatal; otherwise the generator runs with--allow-missing-ggshield-sbom.release.yamlalso attaches the SBOMs to the draft GitHub release and checks there is one per VSIX.scripts/generate-sbom.test.mjs, run bynpm run test:scriptsin the lint job.SECURITY.mddocuments the SBOMs, andpackage.jsonnow declares the MIT license, which the SBOM reads.--ggshield-sbom <file>takes a local ggshield SBOM instead. I used it with SBOMs generated by hand for ggshield 1.56.0, to produce SBOMs of 0.25.0 for the customer.Validation
npm run test:scriptslinux-x64locally (vsce package --target linux-x64), then rannode scripts/generate-sbom.mjs --target linux-x64 --ggshield-sbom <ggshield 1.56.0 SBOM> -o out.cdx.json. The output passes strict CycloneDX 1.5 validation, andgrype sbom:out.cdx.jsonreports the nested ggshield components.esbuild-meta.jsonis not in the VSIX.PR check list
🤖 Generated with Claude Code