[ingestion/data-quality issue] CycloneDX specification as of 1.4 does not require the component field in metadata #976
Labels
bug
Something isn't working
data-quality
Things related to data quality and document ingestion
data-sources
Describe the bug
Discovered by kurt-r2c in original PR #896:
The CycloneDX specification as of 1.4 does not require the component field in metadata, nor does it require the BOM ref field: https://cyclonedx.org/docs/1.4/json/#metadata_component_bom-ref.
guac was encountering a NPE when trying to read these uninitialized fields from the CycloneDX struct.
Some SBOM generators that only operate on package lockfiles (such as https://pypi.org/project/cyclonedx-bom/) do not generate the component metadata field, nor are they required to by the spec.
To Reproduce
ingestion of an SBOM that is generated by SBOM generators that only operate on package lockfiles (such as https://pypi.org/project/cyclonedx-bom/) that do not generate the component metadata field.
Expected behavior
Currently, output an error message that this is not currently supported as there would be no top-level package node and would result in a bunch of singleton packages. Further discussion and handling will need to be done to handle this use-case.
GUAC version
v0.1
The text was updated successfully, but these errors were encountered: