SBOM - Software Bill of Materials
The SBOM module in Polski for WooCommerce downloads a CycloneDX 1.4 JSON software bill of materials for the Polski plugin, listing the Composer packages it ships (and npm packages in a development checkout) with their versions and Package URLs. It is meant for software manufacturers, runs on demand and is off by default.
Under the EU Cyber Resilience Act, manufacturers of products with digital elements draw up an SBOM (Annex I Part II); a shop that only sells goods has no such duty. The format is accepted by most SBOM consumers (Trivy, Dependency-Track, Grype).
Why CycloneDX and not SPDX
Section titled "Why CycloneDX and not SPDX"Both formats are widely accepted. CycloneDX 1.4 JSON was chosen because the shape is simpler, is consumed directly by Trivy and Dependency-Track, and uses Package URLs (purl) which ship out-of-the-box for Composer and npm.
Configuration
Section titled "Configuration"Enable SBOM (software bill of materials) in Polski > Modules; it is off by default. The download screen is then linked from Polski > Reports & Tools.
Sources
Section titled "Sources"For each target directory the generator reads:
| File | Content |
|---|---|
vendor/composer/installed.json |
PHP packages shipped in the plugin package |
composer.lock |
PHP packages (sections packages and packages-dev; dev packages get scope: optional), development checkout only |
package-lock.json |
JavaScript packages, development checkout only. The published package has no lock file, so JavaScript libraries bundled into the plugin scripts are not listed |
| Plugin header | Name and version (from VERSION constant) |
The generator runs on-demand only. The JSON is not cached - generation for a FREE plugin with around 100 dependencies takes under 200 ms.
Targets
Section titled "Targets"polski- the FREE plugin (WP_PLUGIN_DIR/polskiorPolski\PLUGIN_DIR)
Output
Section titled "Output"The file is served with:
Content-Type: application/vnd.cyclonedx+json; charset=utf-8Content-Disposition: attachment; filename="<slug>-sbom-<version>-<UTC timestamp>.cdx.json"Example (truncated):
{ "bomFormat": "CycloneDX", "specVersion": "1.4", "serialNumber": "urn:uuid:5a3b....", "version": 1, "metadata": { "timestamp": "2026-04-19T08:30:00+00:00", "tools": [{ "vendor": "WPPoland", "name": "Polski SBOM generator", "version": "1.0" }], "component": { "type": "application", "bom-ref": "wppoland/polski", "name": "polski", "version": "2.1.0", "publisher": "WPPoland" } }, "components": [ { "type": "library", "bom-ref": "composer:woocommerce/woocommerce-blocks", "name": "woocommerce/woocommerce-blocks", "version": "10.8.4", "scope": "required", "purl": "pkg:composer/woocommerce/woocommerce-blocks@10.8.4", "licenses": [{ "license": { "id": "GPL-3.0-or-later" } }] } ]}trivy sbom polski-sbom-2.1.0-20260419-083000.cdx.jsonDependency-Track
Section titled "Dependency-Track"- Create a project in Dependency-Track (one per plugin).
- Upload the JSON via the UI or the
/api/v1/bomendpoint. - Connect the project to a CI pipeline so that every release updates the BOM.
CRA context
Section titled "CRA context"Under the Cyber Resilience Act, manufacturers of products with digital elements draw up an SBOM (Annex I Part II); it is not a duty of a shop that sells goods. A manufacturer can keep the CycloneDX JSON next to each tagged release as part of its technical documentation. The filename embeds the version and UTC timestamp so artefacts stay unique across releases.
Permissions
Section titled "Permissions"- UI and download:
manage_woocommerce - Nonce:
polski_sbom_download(required for the POST action)
Limitations
Section titled "Limitations"- Transitive dependency relationships (
dependenciestree) are not emitted yet (flat list only) - WordPress itself is not a component in the BOM (it is the runtime, not a bundled dependency)
- Version discovered from the plugin constants only - not from the
composer.jsonfield - No HMAC signature on the BOM
Does my online shop need an SBOM?
Section titled "Does my online shop need an SBOM?"Under the Cyber Resilience Act the SBOM duty (Annex I Part II) is on manufacturers of products with digital elements. A shop that only sells goods has no such duty; the module is for shops that also publish their own software.
Which tools can read the file?
Section titled "Which tools can read the file?"Any CycloneDX 1.4 consumer, for example Trivy, Grype or Dependency-Track.
Are JavaScript libraries listed?
Section titled "Are JavaScript libraries listed?"Only in a development checkout that has package-lock.json. The published plugin package has no lock file, so JavaScript bundled into its scripts is not listed.