-
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
feat(java): use remote repositories from settings.xml
for pom.xml
files
#7807
Comments
I am not sure, if this query of mine is related or not; but I am finding myself stuck in a situation where I need some support from Trivy to scan desired repository.
I am running a Jenkins pipeline script with withMaven block providing the settings id as parameter, but that settings is ignored by Trivy. |
Hello @arkajnag23 |
@DmitriyLewen our pipeline creates a temp settings file and a temp repository when running the builds as its ec2 instances, hence looking for an option of providing maven settings is |
This may be the reason why Trivy doesn't detect the settings file. Without information about local repository Trivy gets pom's from maven central. |
@DmitriyLewen is there any way where we can set the settings file path?? |
unfortunately at the moment Trivy doesn't have such functionality. like the solution - you can change $MAVEN_HOME at the time of Trivy launch |
Hello @DmitriyLewen, as discussed in #7175 (reply in thread), I did some experiments regarding the different priorities when maven downloads packages. Here are the results: Test cases and results
Hope this helps! Kind regards, Malte |
@malmor Thanks! |
Description
We currently get
repositories
frompom.xml
files +maven central
:trivy/pkg/dependency/parser/java/pom/parse.go
Lines 339 to 342 in 57e24aa
But
settings.xml
file may also contain remote repositories.We need to add logic to get repositories from this file.
See more details in #7175
Discussed in #7175
The text was updated successfully, but these errors were encountered: