TOOMANYREQUESTS errors when downloading java-db from ghcr.io #7591
-
QuestionIssue in java-db download Shouldn't trivy check some sort of release-info/metadata before trying to download java-db? This release-info could indicate that a new java-db is available, perhaps by using content-hash of the available java-db). If new java-db is not available or has failed (just like this issue-https://github.com/aquasecurity/trivy-java-db/actions), then trivy should not attempt to download the artifact at all. The current logic is dependent on the publishing process of java-db and the schedule of download is governed by NextUpdate field of metadata.json. With this approach trivy always attempts to download java-db (even if the one that is available is older or has failed). This logic does not consider that future publishing of java-db could fail. TargetContainer Image ScannerVulnerability Output FormatJSON ModeStandalone Operating SystemLInux VersionNo response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 16 replies
-
Yes, your suggestion makes sense. We already compare the content hash for misconfiguration checks to prevent the bundle from being downloaded unnecessarily. We can do the same for trivy-java-db as well. Lines 172 to 175 in 37d549e On the other hand, we have Lines 142 to 145 in 37d549e I didn't find the same logic in trivy-java-db. Did we forgot to add it or am I missing something? @DmitriyLewen Line 56 in 37d549e |
Beta Was this translation helpful? Give feedback.
-
BTW: What is the reason to load
For Trivy 17.x I could read in the docs that it is downloaded every 12 hours. In the docs for Trivy 55 I don't find anything about it. |
Beta Was this translation helpful? Give feedback.
-
For those who are still facing issues, according to maintainer's suggestion, this below snippet highlights the example quick fix code that I created:
(this is for trivy-db, if you are using java version, you can adjust it accordingly)
Still failed to fetch? You can wait until the rate limit period is over or we can use AWS ECR mirror to trigger fetch, then as soon as it is available to fetch, run it and store to cache. |
Beta Was this translation helpful? Give feedback.
-
This situation has really become unworkable for us. I will implement the workaround suggested by @gnomefin (thanks a lot for that), but I do hope that the developers take action to avoid this from happening for other users. |
Beta Was this translation helpful? Give feedback.
-
Hi all, after updating to v0.56.1 we still have the issue when running from SemaphoreCI.
|
Beta Was this translation helpful? Give feedback.
@knqyf263 #7592