-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: Add dependencyManagement exclusions to the child exclusions #6969
Conversation
|
75b02ab
to
2bac371
Compare
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.
81492e4
to
af516ff
Compare
@DmitriyLewen How do I run the tests...even on main, I'm getting failures with:
|
af516ff
to
d6179cb
Compare
@DmitriyLewen I added a test, but I'm having trouble running the tests locally even with mage, can you enable the workflow please? |
d6179cb
to
8c1aa26
Compare
it should work ➜ cd ./pkg/dependency/parser/java/pom
➜ go test -run "TestPom_Parse"
PASS
ok github.com/aquasecurity/trivy/pkg/dependency/parser/java/pom 0.039s
|
8c1aa26
to
7092c74
Compare
Please re-run the tests |
All checks passed 👍 |
@coheigea I changed your test to show that |
Yes it's fine thanks! @DmitriyLewen |
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.
…asecurity#6969) Co-authored-by: DmitriyLewen <[email protected]>
I noticed that if I have a child pom with a dependency with some exclusions, and a parent pom with a dependencyManagement section with the same dependency with different exclusions, then Trivy only uses the child exclusions.
This is not the behaviour that the maven command line uses, the mvn dependency:tree combines the set of exclusions in this case.
To reproduce unzip "trivy.zip" attached and run:
This will return nothing as jettison is excluded in the parent pom. Now run:
and see it returns findings in jettison even though it's not on the classpath