-
Notifications
You must be signed in to change notification settings - Fork 20
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
Find the DESCRIBES relationship by looking through attached packages #189
Conversation
sounds reasonable Co-authored-by: John Speed Meyers <[email protected]>
# Check if any of the "DESCRIBES" relationships describe a Package | ||
describes_package = any( | ||
"Package" in rel.related_spdx_element_id for rel in describes_relationships | ||
rel.related_spdx_element_id in spdx_id_set for rel in describes_relationships |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is certainly superior. Thank you!
@DanielOjalvo, thank you! Can you please use You can get more information here. |
QUESTION: Is this a breaking change or not? The tests pass, but I worry changing the internal logic of a key function SHOULD be a breaking change. Hmmm. Thoughts from anyone? |
One other question, which was raised in the discussion in #186: Is the intent of this check actually to determine if there is at least one root node in an SPDX document? This question and its answer is probably out of scope for this PR and issue. To me, it sounds like this should be a discussion of how the SPDX NTIA mapping document defines this check. I worry that the written definition ("The document must DESCRIBES at least one package") and the intent I read in the related issue thread aren't the same, but maybe I am confused. (I am often confused!) Anyways, I wanted to discuss this before merging this change. |
@goneall: Can you please review this PR too? For the actual code review, can you please take a narrow view, simply checking if the logic of the code matches the current written intent of the SPDX NTIA mapping? And for answering the other questions, can you please your broad SPDX expertise and advise? Thank you, as always. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this is a more precise approach validating the NTIA minimum is being followed. There may be cases where the described relationship is only to a file which, in my opinion, would not be a valid NITA minimum SBOM since it doesn't describe a package.
cc: @kestewart - Kate - let me know if you agree / disagree with my above conclusion. |
Thank you, @goneall. I'll give Kate time to weigh in before merging. [EDITED MY COMMENT. I confused myself. Please ignore.] |
I'll merge on Friday, June 28, 2024 unless I hear any objections. I won't cut a new release ( |
No description provided.