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: update parsing logic to remove empty space #2273
Conversation
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
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 seems like it was a subtle bug. Is it possible to get this behavior under unit test so that we don't re-introduce the bug?
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.
LGTM but agree with @willmurphyscode about adding a basic test for this case somehow
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
@kzantow @willmurphyscode I redid my initial cases with the ones provided by the community in the two issues linked to this PR. I don't think it's perfect, and the full solution will come from #2029, but this should get us generating valid SBOMS in more instances where these edge cases pop up around the metadata |
* fix: update parsing logic to remove empty space * tests: update with test cases provided by community --------- Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
…re#2273) * fix: update parsing logic to remove empty space * tests: update with test cases provided by community --------- Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Summary
While we wait for clarity on #2029 this PR submits a small fix for the following issues:
A user submitted a valid
*.dll
where ProductName was the correct package name. This PR keeps the current behavior while falling back toProductName
. It also adds a check so thatname
orversion
can no longer be" "
.