Skip to content
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

Instruct trivy to use fallback for downloading db. #420

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

purple4reina
Copy link
Contributor

Seeing error when running nightly vulnerability scan

Running Trivy with options: trivy image public.ecr.aws/datadog/lambda-extension:latest
2024-10-20T01:32:03Z	INFO	[vulndb] Need to update DB
2024-10-20T01:32:03Z	INFO	[vulndb] Downloading vulnerability DB...
2024-10-20T01:32:03Z	INFO	[vulndb] Downloading artifact...	repo="ghcr.io/aquasecurity/trivy-db:2"
2024-10-20T01:32:04Z	ERROR	[vulndb] Failed to download artifact	repo="ghcr.io/aquasecurity/trivy-db:2" err="OCI repository error: 1 error occurred:\n\t* GET https://ghcr.io/v2/aquasecurity/trivy-db/manifests/2: TOOMANYREQUESTS: retry-after: 1.084625ms, allowed: 44000/minute\n\n"
2024-10-20T01:32:04Z	FATAL	Fatal error	init error: DB error: failed to download vulnerability DB: OCI artifact error: failed to download vulnerability DB: failed to download artifact from any source

Using solution from this github issue, adds fallback db when rate limit is hit.

@purple4reina purple4reina requested a review from a team as a code owner October 21, 2024 16:38
@purple4reina
Copy link
Contributor Author

Tested this branch out, retry logic works

Screenshot 2024-10-21 at 10 28 42 AM

@purple4reina purple4reina merged commit 4cdce1c into main Oct 21, 2024
27 checks passed
@purple4reina purple4reina deleted the rey.abolofia/vuln-fallback branch October 21, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants