Once again, thank you for this most excellent tool. I attempted to generate an SBOM in CycloneDX 1.4 format. I set the version to "1.4" and then generated the file, but it did not seem to set the specVersion or the BOM version correctly:
We can see that the "schema" value was pointed to 1.4 but the "specVersion" is still 1.5 and the "version" was not affected at all.
As version is an overloaded term, I would think that to change the specification version would be a function call like set_specVersion() and set_version would affect the serial number version. That in my mind would be more consistent with the other "set_version" functions.
Thank you for considering this ticket.
Complete script here:
print_hi('PyCharm')
sbg = SBOMGenerator(format='json', sbom_type='cyclonedx')
my_sbom = SBOM()
my_sbom.set_type(sbom_type='cyclonedx')
my_sbom.set_version("1.4")
sbom_packages = {}
my_package = SBOMPackage()
my_package.set_name("glibc")
my_package.set_version("2.15")
my_package.set_supplier("organisation", "gnu")
my_package.set_licensedeclared("GPL3")
sbom_packages[(my_package.get_name(), my_package.get_value('version'))] = my_package.get_package()
my_sbom.add_packages(sbom_packages)
my_file = SBOMFile()
my_file.set_name("OneTwoThree")
my_file.set_licenseconcluded("MIT")
hl = hashlib.sha256()
hl.update(b"This really should point to a file...")
filehash_hex = hl.hexdigest()
my_file.set_checksum("SHA256", filehash_hex)
files = {}
files[my_file.get_name()] = my_file.get_file()
my_sbom.add_files(files)
# Will be displayed on console
sbg.generate("ClinicianApp", my_sbom.get_sbom())
Hello,
Once again, thank you for this most excellent tool. I attempted to generate an SBOM in CycloneDX 1.4 format. I set the version to "1.4" and then generated the file, but it did not seem to set the specVersion or the BOM version correctly:
Output:
We can see that the "schema" value was pointed to 1.4 but the "specVersion" is still 1.5 and the "version" was not affected at all.
As version is an overloaded term, I would think that to change the specification version would be a function call like set_specVersion() and set_version would affect the serial number version. That in my mind would be more consistent with the other "set_version" functions.
Thank you for considering this ticket.
Complete script here: