Closed mmarseu closed 4 months ago
When implementing this, I ran into the gotcha I'd like to discuss in #142. Specifically, here the problem is what to do if the SBOM we're outputting doesn't yet have a .metadata.tools
property. Do we create it as an object, as is the state-of-the-art in CycloneDX 1.5 or do we create it as an array, which is now deprecated but used to be the only valid option until 1.5.
Until we set ourselves a clear strategy for dealing with CycloneDX versions, the answer is simple: I'm going to create an array, even if it's deprecated. It is the only way to ensure valid output. This comment is only to document this choice.
CycloneDX 1.5 has deprecated the
.metadata.tools
array in favor of an object. See here: https://cyclonedx.org/docs/1.5/json/#tab-pane_metadata_tools_oneOf_i0Example:
Currently, this tool errors out when faced with an SBOM with such an object: