-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
We have several directories we want to check in a single Checkov run, either invoking directly e.g. checkov -d deploys1 -d deploys2
or with the configuration file, for example:
---
directory:
- deploys1
- deploys2
We are predominantly using the terraform framework but I suspect that's not relevant in this case. It seems that only the first directory provided is ever checked. To demonstrate this here are some invocations and their output:
$ checkov -d deploys1 --quiet
terraform scan results:
Passed checks: 154, Failed checks: 0, Skipped checks: 9
$ checkov -d deploys2 --quiet
terraform scan results:
Passed checks: 3274, Failed checks: 0, Skipped checks: 326
$ checkov -d deploys1 -d deploys2 --quiet
terraform scan results:
Passed checks: 154, Failed checks: 0, Skipped checks: 9
terraform scan results:
Passed checks: 308, Failed checks: 0, Skipped checks: 18
It appears that the first directory is added multiple times. I've tried adding a few different directories several times and after the first checked directory is complete, the rest of the directories are printed out quickly. Therefore I believe they are not really being checked multiple times but the results are being printed out multiple times (with some multiplication of checks / skipped checks in the mix).
The same behaviour can be observed whether you configure the directories on the command line or in the configuration file.
I am using Checkov 3.2.477 on MacOS.