There is 1 update.
 
 
XWiki Commons / cid:jira-generated-image-avatar-66618288-c2a0-4290-a3a7-75d04909524d XCOMMONS-3865 Open

Fold bundled npm packages and third-party webjars into the artifact SBOMs

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-a9b07527-b7e1-429c-bb13-c19d16aa1aba Changes by Vincent Massol on 30/Oct/26 15:40
 
Description: The SBOM generated by the {{cyclonedx-maven-plugin}} only lists Maven dependencies. It misses:
* the npm packages bundled (e.g. by Vite) inside our webjars, which are invisible to Maven;
* the npm identity of third-party webjars, which only appear as {{pkg:maven/org.webjars/...}}, so vulnerability scanners don't match them against npm advisories (jQuery, Bootstrap...).

h2. Proposal

Add a new mojo in a Commons tool Maven plugin, run after {{makeBom}} in the {{release}} profile, that:
* folds the Embedded SBOMs found in {{META-INF/sbom/}} of the module and of its resolved dependency JARs into the module's SBOM, recording each bundled component as contained in its JAR;
* maps third-party webjars to their {{pkg:npm}} purl, using the webjar's own metadata plus a curated mapping table, and warns for unmapped webjars;
* gives every component a stable purl and a unique, deterministic {{bom-ref}} (containing JAR purl + npm purl), to be ready for VEX later.
* sets the SBOM {{metadata.supplier}} and {{metadata.manufacturer}} to the XWiki project, which the {{cyclonedx-maven-plugin}} cannot do (it only sets {{publisher}} from the POM {{<organization>}}), as expected by the CRA guidance (BSI TR-03183-2).

Whether the bundled components are nested under their JAR component or listed flat with a containment relationship is decided by a prototype checking how scanners (e.g. Grype, Dependency-Track) read each layout.

Design: https://design.xwiki.org/xwiki/bin/view/Proposal/SBOMPerRelease
Forum: https://forum.xwiki.org/t/publishing-an-sbom-with-every-xwiki-release/18996