-
Notifications
You must be signed in to change notification settings - Fork 544
fix: spdx sbom cpe bug #4733
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
fix: spdx sbom cpe bug #4733
Conversation
@terriko @anthonyharrison PTAL and let me know what you think |
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 would resolve that bug, but I think @anthonyharrison is correct that it may introduce some not-so-great side effects.
Right now, I'd like us to change things so we return ALL references rather than having a preference order at all. (I know, @anthonyharrison is asserting that we could just prefer purl, but obviously that's what we were doing and it wasn't working as people expected either.)
So you'd need to get rid of the elifs and set this up to return a potential list of tuples, and possibly change anywhere that parse_ext_ref is called to handle an list instead of a single tuple.
Hey @AryanBakliwal Any Progress on this one? |
@mastersans I will make the changes discussed and push them soon. |
Signed-off-by: Aryan Bakliwal <[email protected]>
069eb25
to
4f87d88
Compare
@terriko @mastersans I have updated it to return all external references rather than one output:
|
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.
Looks good to me. I'll have @terriko also have a second look, otherwise will get it merged.
I'm updating the branch and re-running the tests for safety, but I'll set this to merge when that's done since @mastersans has already reviewed it. |
This change completely broke parsing of SBOMs that lack external references, such as the SPDX SBOMs generated by this tool itself. Looking at the commit, it's obvious why. This commit just removed handling of all SBOM entries for packages that lack external references. |
fixes: #4700
Changed the order of decoding at parse.py#L382
Output