Skip to content

ghcr rate limit for Trivy - overriding DB repositories #21163

@marevers

Description

@marevers

Since a few weeks we are also running into the rate limit for ghcr.io when the Trivy scanners are trying to download the vulnerability DB. A suggested solution on the Trivy side is to override the DB image repositories to ECR which should help with the rate limiting.

I have added the following environment variables in the chart:

...
    trivy:
      extraEnvVars:
        - name: SCANNER_TRIVY_DB_REPOSITORY
          value: public.ecr.aws/aquasecurity/trivy-db
        - name: SCANNER_TRIVY_JAVA_DB_REPOSITORY
          value: public.ecr.aws/aquasecurity/trivy-java-db
...

The environment variables are correctly applied to the container, but it is still trying to download the DB from ghcr.io resulting in the rate limit / TOOMANYREQUESTS error.

Are these environment variables actually supported by the trivy-adapter-photon container? We are running the chart version 1.15.1 with trivy-adapter-photon:v2.11.1 as per the default values.

Metadata

Metadata

Assignees

Labels

more-info-neededThe issue author need to provide more details and context to the issuescanner/trivy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions