harbor icon indicating copy to clipboard operation
harbor copied to clipboard

MAVEN_CENTRAL_URL to harbor.yml trivy config

Open texano00 opened this issue 2 years ago • 0 comments

Describe the solution you'd like In our business scenario, we configured Trivy with maven proxy (as described on official Trivy troubleshooting https://aquasecurity.github.io/trivy/v0.25.4/docs/references/troubleshooting/) to both caching and throttling and it works like a charm. In order to do it, it's necessary to manually add the MAVEN_CENTRAL_URL env to trivy config environment.

My simple proposal is to add a new key "trivy.maven_central_url" inside harbor.yml which if is not empty it should auto add to trivy env the MAVEN_CENTRAL_URL variable. If "trivy.maven_central_url" empty or not configured NOT add anything to trivy env. This param should be also managed inside migration script.

The main reason of this proposal is portability mainly during update process, right now we need to remember to manually add MAVEN_CENTRAL_URL to trivy env config because migration script is not caring about it yet.

Thanks!

texano00 avatar Sep 09 '22 07:09 texano00