Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira:
Trivy scans the source code and any container image for vulnerabilities. However, when using the default repository for the trivy database, we see rate limiting issues from GitHub Container Registry:
This has been widely reported on the Trivy git repositories and the Trivy maintainers are making changes in an attempt to improve the situation. However it's unclear how long these changes will take and it appears the changes will only be available in the latest versions.
We've previously setup a Google Artifact Registry "remote repository" which effectively caches images from the default GitHub Container Registry. However, this has not been as successful as we had hoped because the Google Artifact Registry remote repository still has to go to GitHub Container Registry to collect new images, and we experience the rate limiting errors again.
We now have a new, standard, Google Artifact Registry image repository to hold the
trivy-db
images. This is updated from a scheduled job every 6 hours, rather than pulling new images when Trivy executes. This may result in Trivy using a slightly older vulnerabilities database, but should ensure that when executing Trivy there's always atrivy-db
image available.This PR updates the settings trivy uses to get the database from this new repository, and avoiding the rate limiting from ghcr.
This PR was generated using turbolift.