tools-python
tools-python copied to clipboard
RDF SBOM document version not read correctly
I tried changing the version of a rdf SBOM from 2.1 to 2.2 by changing the tag <specVersion>SPDX-2.1</specVersion> to <specVersion>SPDX-2.2</specVersion>. However, the rdf parser still returns a document version of 2.1 instead of 2.2.
Hi @linynjosh. Thanks for your issue. Is this issue still open? If yes, could you please provide an example to make this reproducable?
I tried the following:
parserdoes not seems to print the SPDX version at all. While this is not ideal, I'd ignore it for now given that the tools currently have little to no version-specific handling. Tested via the following (also tried grepping for some other terms and checked the output manually)
tools-python$ parser --file data/SPDXRdfExample.rdf | grep SPDX
convertordoes seem to respect the spec version. I used the following command, once with the unchanged example which has version 2.1, then changed the version to 2.2 and ran it again.
tools-python$ convertor -i data/SPDXRdfExample.rdf -t rdf output.rdf
The output files had a tag <ns1:specVersion>SPDX-2.1</ns1:specVersion> resp. <ns1:specVersion>SPDX-2.2</ns1:specVersion>.
I'll close this for now. @linynjosh Please ping if I misunderstood the issue.