-
Notifications
You must be signed in to change notification settings - Fork 379
Description
What is the functionality you want to propose?
SBOMs in CycloneDX format contain a section with metadata about the main component described by the document. So far, CycloneDxReporter fills this section with the following values:
typeis set toFILEnameis set to the URL of the analyzed repositoryversionis set to the VCS revision of the repository
These hard-coded values are not always appropriate for some use cases. Therefore, the reporter should support configuration options to override them. This would be in-line with the SPDX reporter, which allows to configure some of the metadata properties.
What is the use-case for your enhancement?
The generated SBOMs are to be uploaded to a central SBOM database. There are some conventions for the metadata properties they need to adhere to.
Alternatives you have considered
As I have learned from a customer, the current values set by the reporter are a bit strange:
- The type
FILEtypically means some non-executable file, such as an office document. There are SBOM processing tools that do not expect that such components declare dependencies. - Having a URL in the
nameproperty does not seem right. - A commit hash in the
versionproperty is rather technical; for humans the version of the component/the artifact is more meaningful.
So, as an alternative - or in addition -, it would make sense to change the default values set by the reporter:
- A better default for the
typecould beApplication. namecould default to the name of the analyzed ORT project.versioncould default to the version of the analyzed ORT project.
I am not sure, however, whether changing these defaults could break something; this would in any case be a breaking change.