-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix(misconf): Update trivy-checks default repo to mirror.gcr.io
#7953
Conversation
trivy-cheks is available on Docker Hub trivy conf main.tf -d --checks-bundle-repository mirror.gcr.io/aquasec/trivy-checks:latest
2024-11-19T14:03:27+06:00 DEBUG Default config file "file_path=trivy.yaml" not found, using built in values
2024-11-19T14:03:27+06:00 DEBUG Cache dir dir="/Users/nikita/Library/Caches/trivy"
2024-11-19T14:03:27+06:00 DEBUG Cache dir dir="/Users/nikita/Library/Caches/trivy"
2024-11-19T14:03:27+06:00 DEBUG Parsed severities severities=[UNKNOWN LOW MEDIUM HIGH CRITICAL]
2024-11-19T14:03:27+06:00 INFO [misconfig] Misconfiguration scanning is enabled
2024-11-19T14:03:27+06:00 DEBUG [misconfig] Failed to open the check metadata err="open /Users/nikita/Library/Caches/trivy/policy/metadata.json: no such file or directory"
2024-11-19T14:03:27+06:00 INFO [misconfig] Need to update the built-in checks
2024-11-19T14:03:27+06:00 INFO [misconfig] Downloading the built-in checks...
2024-11-19T14:03:27+06:00 DEBUG [misconfig] Loading check bundle repository="mirror.gcr.io/aquasec/trivy-checks:latest"
201.91 KiB / 201.91 KiB [------------------------------------------------------] 100.00% 2.47 MiB p/s 300ms
2024-11-19T14:03:29+06:00 DEBUG [misconfig] Digest of the built-in checks digest="sha256:adcb0056766fa124695e6d538304b6d4bbf9409eafbc0b6e1f3a8b7439f999c6"
2024-11-19T14:03:29+06:00 DEBUG [misconfig] Checks successfully loaded from disk |
@@ -19,7 +19,7 @@ import ( | |||
|
|||
const ( | |||
BundleVersion = 1 // Latest released MAJOR version for trivy-checks | |||
BundleRepository = "ghcr.io/aquasecurity/trivy-checks" | |||
BundleRepository = "mirror.gcr.io/aquasec/trivy-checks" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also use GHCR as a secondary for other databases. Just in case mirror.gcr.io is down, Trivy falls back into GHCR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from that, I think that the --checks-bundle-repository
flag should also provide fallback functionality just like the --db-repository
flag. Right now we can only specify a single checks repository with this option, it would we great if multiple checks repo can be specified using this option so that if one repo fails second one can be used as a fallback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're discussing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we should. Track #7960
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
mirror.gcr.io
mirror.gcr.io
Description
Merge once trivy-checks is available on DockerHub.
Checklist