anthonyharrison / lib4sbom

Library to ingest and generate SBOMs
Apache License 2.0
14 stars 10 forks source link

SBOM serialNumber Is Missing A Colon #9

Closed rhaley-starfish closed 11 months ago

rhaley-starfish commented 11 months ago

Hello,

Thank you for the fantastic library. This will greatly shorten my path to generating SBOMs. I have generated a test SBOM in CycloneDX format and the serial number appears to be missing a colon:

  "serialNumber": "urn:uuidbfda0bdf-f573-46c0-9f34-2fadfa634a1c",

Should be

  "serialNumber": "urn:uuid:bfda0bdf-f573-46c0-9f34-2fadfa634a1c",

Is there any way to set the serialNumber manually? I was hoping to use one serialNumber and increment the "version" identifier. However, you already have an SBOM.set_version function that seems to set the "specVersion" but not completely. I will open a separate issue for that.

anthonyharrison commented 11 months ago

Thanks for finding this @rhaley-starfish. There is no way to set the serialNumber manually. The serial number is a universally unique identifier that is generated using random numbers. I don't know how useful it would be to introduce a function to set the value as this wouldn't guarantee that the serial number was unique.