-
Notifications
You must be signed in to change notification settings - Fork 213
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: add option to change java db repository #1179
fix: add option to change java db repository #1179
Conversation
2ba39ef
to
493116f
Compare
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.
could please also update trivy-config-docs ?
@nobbs thanks you for this contribution , I have left comments. |
732f71c
to
8ab7000
Compare
the two methods already exist, so let's migrate the env vars to also use them, as it reduces repetition quite a lot
8ab7000
to
a2b28d6
Compare
I've taken care of your comments. Also, grouped the commits again. Should be good now; if not, let me know ;) |
@nobbs lgtm 🚀 |
Description
Trivy does support the use of custom vulnerability database repositories for both the regular DB as well as the Java one (since aquasecurity/trivy#3595) - trivy-operator only supports the former. This PR provides a way to configure the latter one, too.
Also updated the existing tests and added two simple new ones for this new option.
I've also refactored some repetitive env var setup in the
plugins/trivy/plugin.go
file by reusing the already existing methodsconstructEnvVarSourceFromConfigMap
andconstructEnvVarSourceFromSecret
where possible.Checklist