Hi devs,
I’d like us to publish an SBOM (Software Bill of Materials) with every XWiki release. The full design is at https://design.xwiki.org/xwiki/bin/view/Proposal/SBOMPerRelease
Why
- Let users answer “is XWiki X.Y affected by CVE-Z?” without reverse-engineering the WAR.
- Help companies placing XWiki-based products on the EU market meet the CRA’s SBOM obligation (from Dec 2027). The CRA only asks manufacturers for an SBOM (top-level dependencies at least, any common machine-readable format, in the technical documentation, not necessarily public); details on the design page.
- Fewer false scanner reports (with VEX, later).
Proposal in short
- A CycloneDX JSON SBOM attached to every deployed Maven artifact (
-cyclonedx.jsonclassifier), generated by thecyclonedx-maven-pluginin thereleaseprofile of the Commons top level POM. So Commons, Rendering, Platform and contrib extensions all get it, with a property to skip it. Normal builds are not impacted, and the existing TestRelease CI job exercises it on every build. provideddependencies are excluded (they’re the container’s), XARs installed by the flavor are kept (the WAR SBOM describes the running product), and the supplier is the XWiki project.- JavaScript: Maven doesn’t see the npm packages Vite bundles in our webjars, and third-party webjars only appear as
pkg:maven/org.webjars/..., so scanners miss npm advisories (jQuery, Bootstrap…). Proposal:- our webjars embed the output of
pnpm sbom --prodin their JAR; - a new mojo in a Commons tool plugin folds these embedded SBOMs (plus third-party webjars mapped to
pkg:npm) into the Artifact SBOMs, all the way up to the WAR.
- our webjars embed the output of
- Link the WAR’s SBOM from the download page and the release notes.
- Ready for VEX later: every component (npm ones included) gets a stable purl and a unique, deterministic
bom-ref, and VEX documents will be published separately since released SBOMs are immutable. - Target: complete for 18.10.2 (the cycle LTS), developed on master and backported to
stable-18.10.x.
Why not just scan the WAR? I ran Syft on an 18.9 WAR: 836 Maven components and 0 npm ones, no XARs and no dependency graph. Scanners can’t see inside Vite bundles either, so they don’t remove the need for the embedded SBOMs. It’s still useful as a cross-check later.
Not proposed for now (follow-ups): SBOM in the Docker images, VEX, an instance SBOM exported by the Extension Manager (distribution + installed extensions), and SPDX. I know SPDX has been requested at least once, so it’s parked, not rejected. The CRA doesn’t mandate a format, and BSI TR-03183-2 accepts CycloneDX or SPDX.
WDYT?
Thanks
PS: This post was co-written with Claude Code.