bug(terraform): scans hanging when .terraform dir is present
Hey :)
When a .terraform directory is present, for example in the root level of a directory, and KICS is ran against this repository, the scan freezes / hangs.
Reproduced with KICS 2.0.1 and KICS 2.1.3, using a Mac M1 Pro, happens on an GitHub runners with Ubuntu 22.04 as well
To reproduce, create a .terraform directory (it can be empty), and a .tf file (any content, even "hi")
Run KICS via kics scan --path . or alternatively kics scan --type terraform --path .
Before executing the queries the scan hangs.
Behavior persists even with --exclude-paths=.terraform.
With --verbose and --excldue-paths=.terraform/
Same here!
b04b05491568:/src# kics version
Keeping Infrastructure as Code Secure v2.1.6
Seeing this as well
kics version
Keeping Infrastructure as Code Secure 2.1.10
Same on v2.1.14, using as pre-commit hook.
# If this hangs, try deleting .terraform directory - https://github.com/Checkmarx/kics/issues/7300
- repo: https://github.com/Checkmarx/kics
rev: v2.1.14
hooks:
- id: kics-scan
verbose: true
args:
- --exclude-queries
- e592a0c5-5bdb-414c-9066-5dba7cdea370