Skip to content
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

feat(misconf): Selectively enable misconfiguration scanners #4901

Closed
simar7 opened this issue Aug 1, 2023 · 1 comment · Fixed by #5670
Closed

feat(misconf): Selectively enable misconfiguration scanners #4901

simar7 opened this issue Aug 1, 2023 · 1 comment · Fixed by #5670
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Milestone

Comments

@simar7
Copy link
Member

simar7 commented Aug 1, 2023

Today we don't have a good way to specify only certain misconfiguration scanners to be run and certain to be disabled. For instance with a file directory input like so:

$ ls
Dockerfile
chart.yaml
main.tf

trivy config will scan all of the files. We can limit to an extent by providing file extensions, paths and/or globbing to exclude/include certain types but the approach seems rather convoluted.

Therefore, having a flag to enable selective scanners only (similar to -vuln-type) in config scan will help. I propose that we can pick --config-type as the flag name and provide values such as: dockerfile, helm, terraform.

The use case will look like the following:
trivy config --config-type=dockerfile,helm

Will only scan dockerfile and helm.

@simar7 simar7 added kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning labels Aug 1, 2023
@nikpivkin nikpivkin self-assigned this Aug 14, 2023
@mogopz
Copy link

mogopz commented Nov 3, 2023

This would be great to have. We're blocked from migrating away from tfsec until this is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. scan/misconfiguration Issues relating to misconfiguration scanning
Projects
Archived in project
3 participants