-
Notifications
You must be signed in to change notification settings - Fork 570
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
Syft does not handle the case of parsing a jar with multiple poms #2231
Conversation
b9621dc
to
e5b90b1
Compare
@wagoodman Rebased this after #2220 was merged, if you could take a look please? |
Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>
e5b90b1
to
1940b7e
Compare
rebased again |
@coheigea - thanks for rebasing this! Since this code change didn't break any tests I think I'm going to take your example package and write a quick unit test that validates the change and keeps us covered going forward. Let me see if I can get that in today and then I'll 🟢 and merge this one too =) |
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.
LGTM 🎉
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
anchore#2231) --------- Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org> Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com> Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
The restriction to only parse one pom.xml / pom.properties in the archive fails for certain jars that shade multiple dependencies into the jar. For example:
https://repo1.maven.org/maven2/org/apache/directory/api/api-all/2.0.0/
which has:
Syft does end up finding the license for api-all anyway, because of a LICENSE file included in the archive, but otherwise wouldn't find a license as it's not proceeding to the loop to find the correct pom.