tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

RDF SBOM document version not read correctly

Open linynjosh opened this issue 2 years ago • 1 comments

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.

linynjosh avatar Aug 11 '22 10:08 linynjosh

Hi @linynjosh. Thanks for your issue. Is this issue still open? If yes, could you please provide an example to make this reproducable?

meretp avatar Oct 14 '22 10:10 meretp

I tried the following:

  • parser does 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
  • convertor does 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.

nicoweidner avatar Nov 02 '22 09:11 nicoweidner