Replies: 3 comments 4 replies
-
Hello @candrews
Can you tell about the order of the repositories in this case?
In this case we don't need to check https://repo.maven.apache.org/maven2/. Right? We only need to check https://mycompany.example.com/repository/maven-central-mirror |
Beta Was this translation helpful? Give feedback.
-
Hey, this feature would be really helpful for us too. We are running trivy inside our CI/CD pipelines and scan multiple Java-based projects with During our builds we use a I am not that familiar with Go, so I am not sure if I can create a pull request with such a change / refactoring. Is there something else (examples, reproductions, ...) we could provide to help with the implementation? |
Beta Was this translation helpful? Give feedback.
-
Created #7807 for this task. |
Beta Was this translation helpful? Give feedback.
-
Description
Currently, Trivy reads Maven repositories from the
repositories
section of pom.xml of the project being scanned and checkssettings.xml
only for the username/password credentials to access that repository.Trivy should also read repositories from
settings.xml
. That would better mimic Maven's behavior, further improving scan accuracy and improving offline support.For example, given this
~/.m2/settings.xml
:Trivy would:
mycompany-internal-releases
with the URL https://mycompany.example.com/repository/internal-releases and the provided username/password to the repositories to search for releasesmycompany-internal-snapshots
with the URL https://mycompany.example.com/repository/internal-snapshots and the provided username/password to the repositories to search for snapshotshttps://repo.maven.apache.org/maven2/
to the releases repositories list, add https://mycompany.example.com/repository/maven-central-mirror and use the provided username/password to access it because it is configured as a mirrorOf centralTarget
None
Scanner
None
Beta Was this translation helpful? Give feedback.
All reactions