From bccfd5fb4109d36fcdee587f0c1b0d463bbeb5f5 Mon Sep 17 00:00:00 2001 From: "stonezdj(Daojun Zhang)" Date: Fri, 15 Nov 2024 11:30:04 +0800 Subject: [PATCH] Change the source of trivy-db to avoid 429 error (#21183) Signed-off-by: stonezdj --- .github/workflows/nightly-trivy-scan.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly-trivy-scan.yml b/.github/workflows/nightly-trivy-scan.yml index 1d881703b..9f390f5e8 100644 --- a/.github/workflows/nightly-trivy-scan.yml +++ b/.github/workflows/nightly-trivy-scan.yml @@ -30,7 +30,11 @@ jobs: format: 'template' template: '@/contrib/sarif.tpl' output: 'trivy-results.sarif' - + env: + # Use AWS' ECR mirror for the trivy-db image, as GitHub's Container + # Registry is returning a TOOMANYREQUESTS error. + # Ref: https://github.com/aquasecurity/trivy-action/issues/389 + TRIVY_DB_REPOSITORY: 'public.ecr.aws/aquasecurity/trivy-db:2' - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v3 with: