Operational container scanning Resolving vulnerabilities due to TOOMANYREQUESTS while pulling trivy-java-db
Self hosted gitlab version 17.4. From the trivy-scan pod logs we had following error:
ERROR\tError during vulnerabilities or misconfiguration scan\terr=\"scan error: scan failed: failed analysis: analyze error: pipeline error: failed to analyze layer (sha256:4c5f388e71e673829df754051fdd5038b76f9996dbb479fecd8cbac34d54a29e): post analysis error: post analysis error: Unable to initialize the Java DB: Java DB update failed: DB download error: OCI repository error: 1 error occurred:\\n\\t* GET https://ghcr.io/v2/aquasecurity/trivy-java-db/manifests/1: TOOMANYREQUESTS: retry-after: 1.01763ms, allowed: 44000/minute
The OCS scan pod says succeeded. But vulnerabilities got resolved.
Does gitlab support using private db repository trivy image --db-repository YOUR_REPO YOUR_IMAGE
Seems there was same issue for container scanning: #433019 (closed) and is closed after upgrading to 0.48. But for OCS the trivy version is >0.52 but we could still see the issue