-
Notifications
You must be signed in to change notification settings - Fork 213
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
Java DB from local volume #1700
Comments
Any ideas for workaround? |
Did anyone sorted out this? values.yaml I have manually added both db and java-db along with their manifest.json files to trivy-server cache "/home/scanner/.cache/trivy" |
@jpbteixeira can you please share more info on your env. ? air-gapped ? trivy is running in client/server mode? |
trivy-operator deployed using helm chart version 0.21.2 Approach 1: Approach 2:
trivy-db and trivy-java-db have been added to TRIVY_CACHE_DIR: /home/scanner/.cache/trivy on trivy-server Files under java-db: ERROR: Unable to initialize the Java DB: Java DB update failed: Java DB update error: '--skip-java-db-update' cannot be specified on the first run Let me know if any more details are needed, please @chen-keinan |
I'm having issues with this too. The Operator is running with I was hoping to get around the requirement of pulling the trivy-java-db each time (for the purposes of a PoC) by setting up a PVC, or baking the java-db into the scanner's container - which looks to have Trivy's cache at Having placed the java-db in that location, I'm still getting this error: ERROR: Unable to initialize the Java DB: Java DB update failed: Java DB update error: '--skip-java-db-update' cannot be specified on the first run
According to the Trivy Docs, this should work. Has anyone found a workaround for this? The Trivy Server deployment has no issues in obtaining the trivy-db from my private OCI repository but the Scanners don't seem to authenticate. Is there value in updating the mechanism for obtaining the trivy-java-db to match the mechanism for obtaining the trivy-db? Or is this more of a "Trivy" issue, than a "Trivy Operator" issue? |
@iambenzo can you describe scan-job pod and confirm that kubectl describe pod <scan-job-xxx> -n trivy-system |
Hey @chen-keinan Here is the Args:
-c
trivy image --slow '<REDACTED>' --scanners vuln,secret --image-config-scanners secret --skip-java-db-update --cache-dir /tmp/trivy/.cache --quiet --list-all-pkgs --format json --server 'http://trivy-service.trivy-system:4954' > /tmp/scan/result_trivy-server.json && bzip2 -c /tmp/scan/result_trivy-server.json | base64 The |
@iambenzo thanks for the input. I'll have a look and update if enhancement is required |
has anyone been successful in implementing it or is this simply not possible at the moment? |
Discussed in #1699
Originally posted by gerbil December 15, 2023
We got an issue with java db (400+mb) downloads from China. For main DB it's possible to use local volume and store it in local folder of trivy server (/home/scanner/.cache/trivy/db), but seems like the same is not possible for Java DB (/home/scanner/.cache/trivy/java-db)
Any suggestions how we could try to mitigate it?
We tried to skip java db update, but seems like it's trying to fetch it anyway:
Log from java scanning job:
The text was updated successfully, but these errors were encountered: