kaidotdev / kube-trivy-exporter

KubeTrivyExporter is Prometheus Exporter that collects all vulnerabilities detected by aquasecurity/trivy in the kubernetes cluster.
MIT License
52 stars 15 forks source link

Private Registry #3

Closed blacs30 closed 4 years ago

blacs30 commented 4 years ago

Thanks for this great exporter!

I face a problem where some of the images are in a private registry. When I use the configuration for trivy where I set TRIVY_USERNAME,TRIVY_PASSWORD and TRIVY_AUTH_URL then trivy scans the images fine. However it somehow looses capability to scan images on public docker/gcr/quay registries.

Have you seen this issue and found a solution for it?

blacs30 commented 4 years ago

To answer myself: Mount the dockerconfigjson for the private registry into the kube-trivy-exporter pod to /root/.docker/config.json. Don't set any env vars. This works fine for me.