-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Add Trivy security scanner #21780
base: main
Are you sure you want to change the base?
Add Trivy security scanner #21780
Conversation
(previously it was escaping the sandbox to use /tmp/trivy, which won't survive reboots)
When running on a module, `get_terraform_backend_and_vars` would detect all vars files. (Because the vars files are typically specified as dependencies on the deployment, the module has none. Inference then grabs all of them.) This is almost certainly not desired, especially since they will be passed when running against the deployment.
# This is the 1st commit message: document using Trivy in all backends # The commit message pantsbuild#2 will be skipped: # fixup! docs
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.
LGMT
Just an observation on how other tools have been added in the past, the default approach I believe is to add their register.py
hook under the experimental package, even when the parent module has already been graduated.
Taking as a reference the Python backend and its extra tools that have been gradually added but I'll let others have the final word on that.
Trivy is a scanner for finding security vulnerabilities and misconfigurations in Docker images, Helm charts, and Terraform modules (among others). This MR adds it for all of those.
I made it as a single MR to minimise churn in the common code (like the invocation of Trivy). Let me know if you'd rather I split this up.