Description
Allow listing of "source" type components
Creating SBOMs for source collections is valuable, e.g. if you (have to) provide a source code bundle for OSS components you ship in a product. To partly address this need, I previously contributed the qualifier arch=source
for Debian packages to the PURL specification.
SPDX provides primaryPackagePurpose
SOURCE
for such use cases. (Note that other "package purposes" closely align with CycloneDX's component types.)
A dedicated "source" component type would enable defining binaries, sources, and their dependencies elegantly within a single SBOM.
For a real world example, see our contribution to a Debian OS file system builder: SBOM Generation for isar. There, we generate both CycloneDX and SPDX SBOMs – with SPDX covering source and binary packages with their relationship, while the CycloneDX SBOM covers binary packages only due to the missing "source" component type.
Possible solutions
I think the straightforward solution is adding "source" to the list of possible component types. This approach aligns with SPDX's model and would enable easy, lossless conversion between the formats.
Alternatives
Alternatively, we could use the generic component type file
, but I think sources are specific and important enough to warrant their own component type.
Currently, we work around this limitation using a property sbomNature
in our taxonomy to indicate that all components in an SBOM are sources. However, this is confusing for both human and coded readers, and prevents proper specification of source-binary dependencies.