Generate a workspace SBOM#
Install conda-sboms into conda’s base environment so conda can discover the plugin:
conda install -n base "conda-forge::conda-sboms>=0.3.0"
Generate from a lockfile#
Create or refresh conda.lock, then export the default environment for the
current platform:
conda workspace lock
conda workspace sbom --file exports/default.cdx.json
To export a different environment or platform:
conda workspace sbom \
--environment test \
--platform linux-64 \
--file exports/test-linux-64.cdx.json
The command reads conda.lock as-is. It does not solve, update the lockfile, or
fetch package archives. For a named platform such as linux-64-cuda, pass
either its declared name or its backing subdir. Use the declared name when
multiple variants share one subdir.
Generate from an installed prefix#
Use --from-prefix to inventory an installed workspace environment:
conda workspace sbom \
--environment test \
--from-prefix \
--file exports/test-installed.cdx.json
Prefix mode supports the host platform only. If --platform names another
platform, the command stops with an error.
Make the output reproducible#
Pass --reproducible to omit metadata.timestamp and record
cdx:reproducible=true:
conda workspace sbom --reproducible \
--file exports/default.cdx.json
The flag takes precedence over SOURCE_DATE_EPOCH. If the SBOM needs a stable
timestamp instead, set SOURCE_DATE_EPOCH:
SOURCE_DATE_EPOCH=1787184000 conda workspace sbom \
--file exports/default.cdx.json
Without --reproducible, conda-sboms rejects an invalid, negative, or
unsupported SOURCE_DATE_EPOCH before writing output. Matching output byte for
byte also depends on unchanged inputs and the same conda-sboms and serializer
versions.
See Export and format interoperability for how lockfile and prefix input differ and which packages each mode includes. See CLI Reference for every command option.