-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid file information in SPDX documents #1240
Comments
Hmm, I don't see these errors in the current/old version of Tern's output when I run
|
I'll take a look at the output you pasted and the output I have, but this seems to be introduced with the latest changes. |
The java-tools don't seem to pick up on all invalidities, please also check with Also, do you get the large (around 6MB) SPDX output? |
@armintaenzertng Yes, I do see errors with pyspdxtools although I'm not convinced all of them are valid or make sense. I tend to trust java tools more because it is actively maintained by @goneall and I'm not sure if the python tools are. But, if you see something that is valid that the java tools don't pick it up, you should file a bug with them. As an example, I see this error with python tools:
SPDXRef-53745f29fd is a layer package in the document, not a file. It is true that a package may contain no files if files_analyzed is false but it may still contain other packages. This error is the majority of what I'm seeing. I don't see the Full error output: $ pyspdxtools -i /home/rose/ternenv/tern/output-golang.json
Also, the output I have is only 25K... not 6MB. 6MB sounds like it contains file information? Maybe try to delete your cache and re-generate. I get 23K for output file when I run with the updated changes as well (no file info). |
@armintaenzertng I will try to generate a file with golang:1.12-alpine using scancode and see if I can re-create the errors you are seeing. |
Running with the old changes, my SBOM with scancode metadata is 3.3MB. Running with the new changes, when I generate a scancode SBOM, It is 6.0MB. So it seems like there is extra metadata in there somewhere.... I do see one of the errors you are talking about with the old changes, though, even with the java tools: I'll take a look. I'm assuming its another issue related to Scancode's recent restructuring. |
Yes, I noticed this bug, too. This is fixed in the current 0.8.0rc3 release (the spdx-tools PR also includes that fixed release already, please update your local code to get the change). |
This is due to the |
@rnjudge: It turns out the java-tools pick up on the invalidities mentioned above, but only after the |
Note: This uses the new version of the SPDX generation introduced in #1233. The old version sports the same errors and a few more that have been already fixed in the new version.
Describe the bug
SPDX outputs with file information have a number of validation issues:
SpdxDocument
can at least be generated)SPDXRef-None-None
orSPDXRef-v2"
LicenseInfoInFile
are not present in theExtractedLicensingInfo
sectionTo Reproduce
I used
tern report -i golang:1.12-alpine -f spdxjson -sv 2.3 -o output.json
to produce the output and then ranpyspdxtools -i output.json
on it (note that the validation takes a while due to large SPDX document).I'm not sure whether
-x scancode
would also be required as I recall that the above command used to not produce any file information before. In case there are problems, I attached myoutput.json
as output.txt (JSON format is not supported by GitHub, it seems).Error in terminal
Here are the validation issues:
Expected behavior
Tern's generated SPDX documents with file information should be valid.
Environment you are running Tern on
Enter all that apply
The text was updated successfully, but these errors were encountered: