-
Notifications
You must be signed in to change notification settings - Fork 577
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
SPDX FileName should not be absolute #2093
Comments
I am also failing similar error, when I run the sbom json file through Ntia-checker. As per the spdx specs, https://spdx.github.io/spdx-spec/v2.3/file-information/#81-file-name-field, the filename field - "In general, every filename is preceded with a ./" I am using the syft 0.87.1. |
Just a note: regardless if there are changes to be made in Syft, it looks like both of these tools are incorrectly validating this field. The spec says:
Nowhere in this text does it say that the filename is required to be a relative path starting with |
Yes, I think the tools should complain if the path starts with "/" and not require that the path starts with "./". See spdx/Spdx-Java-Library#195 I have asked the question in the SPDX tech mailing list. |
I don't really think using absolute paths should be considered incorrect. Take an image scan, for example: the files are all absolute paths within the image filesystem. This makes a lot of sense to me, rather than transitioning these to relative paths starting with |
From the SPDX tech mailing list: I'm curious what the motivation is for paths being relative. If I scan an image, for example, I would expect to see absolute paths to the files within the image filesystem, rather than those being translated to relative paths. Cheers, There's a couple of reasons why this is helpful:
-- William Bartholomew |
Thanks @vargenau -- I followed the discussion on the mailing list, it sounds like we're going to need to update these paths to be relative indeed. |
Thanks. I'm also having the same issue validating with tools-python. |
Hello @kzantow , Any progress on fixing this issue? |
👀 |
Is there any update on this (just re-tried syft 1.11.0)? It definitely seems we should have relative
https://lists.spdx.org/g/Spdx-tech/message/4972 https://spdx.github.io/spdx-spec/v2.3/file-information/#81-file-name-field The current setup fails both https://tools.spdx.org/app/ntia_checker/ and https://tools.spdx.org/app/validate/ due to not using relative paths and also because |
@sej7278 |
@vargenau i guess we could use sed to replace / with ./ on the sbom output, its far from ideal though |
Yes, it is what I am doing, but it is ugly. |
What happened:
Syft generates the following SPDX (tag:value):
tools-python complains that it is invalid SPDX.
The SPDX spec says: "A relative filename".
What you expected to happen:
Have a relative path in FileName.
Steps to reproduce the issue:
Anything else we need to know?:
Environment:
syft version
: syft 0.89.0cat /etc/os-release
or similar): macos 13.5.1The text was updated successfully, but these errors were encountered: