Component inventory and SBOM

Exporting what a scan found in your dependency graph, as CycloneDX or SPDX.

4 sections1 min read

With the sbom check on, a scan records the full component inventory of the repository, which you can export as a CycloneDX or SPDX document.

Turn the check on first

Enable and rescanbash
cf settings checks sbom --add
cf scan --wait

Exporting

Both formatsbash
cf sbom
cf sbom --format spdx
cf sbom --format cyclonedx --output sbom.json
cf sbom --scan <scan-id>
FlagValuesDefault
--formatcyclonedx, spdxcyclonedx
--outputa file pathwrite to stdout
--scana scan idthe newest scan that has components

Without --output the document is written to stdout, which is what you want in a pipeline. With it, the file is written and only the path comes back.

What is in it

The components the scan resolved from your manifests and lockfiles, with their ecosystem, name, and version. Those are the same components the dependency check looks up vulnerabilities against, so the export and the findings agree with each other by construction.

When the export is empty

sbom_unavailable means the scan recorded no components. Either the check was off when it ran, or the repository declares no dependencies in a manifest format Cefense reads. See the ecosystem list in Checks.

Have a correction or need help?

Email the docs team