checkov directory switch not repeatable
See original GitHub issueDescribe the bug When running checkov -h, the directory switch claims it is repeatable but when you repeat it, only the last directory listed is scanned
-d DIRECTORY, --directory DIRECTORY
Terraform root directory (can not be used together with --file). Can be repeated
To Reproduce Steps to reproduce the behavior:
- Create two directories (directory1, directory2) containing valid terraform files
- Run cli command
checkov -d ./directory1 -d ./directory2
- Only directory2 is scanned
Expected behavior Both directory1 and directory2 are scanned
Desktop (please complete the following information):
- Checkov Version: 1.0.180
Additional context I would actually prefer a recursive switch, using the -d directive multiple times is a workaround
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Bug: Check results are reported twice #80
When using checkov github action, check results are reported twice. This issue is reproducible every time. version: 2.0.977 *edit detailed ...
Read more >Multiple --file options given results in duplicate findings (#911) · ...
Checkov Version 1.0.726; Ubuntu. This is in the same ballpark as #115, checkov directory switch not repeatable , but a different kind of...
Read more >New in Checkov: Support multiple development and ...
If --config-file is not set, Checkov will search the specified directory, working directory, or home directory for .checkov.yaml .
Read more >CLI Command Reference
Runs checks but always returns a 0 exit code. Using either –soft-fail-on and / or –hard-fail-on overrides this option, except for the case...
Read more >Chekov v1.1 Release Notes
You should see your new list set in the table. At this point you can create another set by repeating steps 3 –...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m potentially missing something here, but with talk of an
-r
flag, checkov’s behaviour is recursive for-d
anyway;Given a directory with the following layout:
Checkov will return results from all three, this is from the terragoat project under
./terraform
https://github.com/bridgecrewio/terragoat/tree/master/terraformDoes that not solve the original issue of needing to scan multiple directories?
Thanks for contributing to Checkov! We’ve automatically marked this issue as stale to keep our issues list tidy, because it has not had any activity for 6 months. It will be closed in 14 days if no further activity occurs. Commenting on this issue will remove the stale tag. If you want to talk through the issue or help us understand the priority and context, feel free to add a comment or join us in the Checkov slack channel at https://slack.bridgecrew.io Thanks!