Trivy DB rate limit issues while downloading DBs #7699
Replies: 3 comments 2 replies
-
I have created a private ECR Pull-Through-Cache four user users, with the idea that we could use a cached copy and only D/L a new DB once whenever it changes. Even with this, the ECR Pull Through Cache is hitting rate limits when pulling from ghcr, which it is only doing once every 24h (at most). |
Beta Was this translation helpful? Give feedback.
-
I'm not sure it's related, but it works properly on ubuntu-22.04 github runners. Please aware that ubuntu-latest is pointing now to ubuntu-24.04 |
Beta Was this translation helpful? Give feedback.
-
Above for the misconfig checks bundle it is mentioned that a mirror is not being provided for misconfig checks bundle and Trivy scans will run as expected because of the embedded checks bundle. But I'm facing an issue where I'm getting 'AVD-DS-0031 (CRITICAL): Possible exposure of secret' misconfig occurrences for some of my dockerfiles when the latest misconfig checks bundle download is successful, and not when the download of misconfig checks gets failed. I'm using trivy version 0.56.1 on Ubuntu 24.04. I think that providing an additional mirror for misconfig checks bundle just like the ones provided for vulnerability and java db, and incorporating --checks-bundle-repository flag (which is used to specify OCI registry for misconfig checks bundle) with fallback to other registry source feature just like the one implemented for vuln and java db, can fix this scan results inconsistency issue. |
Beta Was this translation helpful? Give feedback.
-
Description
Recently Trivy started to experience rate limit issues while downloading
trivy-db
andtrivy-java-db
(here on referred collectively as "DBs") that are required for vulnerability and java scanning. Our users have seen this both while using the Trivy CLI and also when using the trivy-action on GitHub.We have raised this issue with GitHub, you can track the progress here
Steps to Remediate
In the meantime, we've added several ways to improve the situation for our users.
Trivy CLI
--db-repository
and--java-db-repository
flags. You can read more on the options here"ghcr.io/aquasecurity/trivy-db:2"
"public.ecr.aws/aquasecurity/trivy-db:2"
"aquasec/trivy-db:2"
"ghcr.io/aquasecurity/trivy-java-db:1"
"public.ecr.aws/aquasecurity/trivy-java-db:1"
"aquasec/trivy-java-db:1"
"ghcr.io/aquasecurity/trivy-checks:1"
Trivy GitHub Action
Trivy Action uses Trivy under the hood so the above mentioned improvements are also available to it. Furthermore, we've implemented the following:
Beta Was this translation helpful? Give feedback.
All reactions