fix: update parsing logic to remove empty space#2273
Merged
Conversation
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This was
linked to
issues
Oct 30, 2023
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Contributor
willmurphyscode
left a comment
There was a problem hiding this comment.
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?
kzantow
approved these changes
Oct 31, 2023
Contributor
kzantow
left a comment
There was a problem hiding this comment.
LGTM but agree with @willmurphyscode about adding a basic test for this case somehow
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Contributor
Author
|
@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 |
wagoodman
pushed a commit
that referenced
this pull request
Oct 31, 2023
* 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>
GijsCalis
pushed a commit
to GijsCalis/syft
that referenced
this pull request
Feb 19, 2024
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While we wait for clarity on #2029 this PR submits a small fix for the following issues:
A user submitted a valid
*.dllwhere ProductName was the correct package name. This PR keeps the current behavior while falling back toProductName. It also adds a check so thatnameorversioncan no longer be" ".