Interview Prep/DevSecOps/Container image and IaC scanning

Checkov fails 22 checks inside `.terraform/modules/` from a public registry module you call

IntermediateTroubleshootingContainer image and IaC scanning
Answer

Likely causes → Checkov scans downloaded module source when --download-external-modules true or when .terraform/ is present in the scanned directory.

Diagnose →

checkov -d . --compact --quiet -o json | jq -r '.results.failed_checks[] | "\(.check_id) \(.file_path)"' | sort | uniq -c

Fix → Decide deliberately: scan your code and the module inputs you pass, skip vendored paths (--skip-path .terraform), and fix issues you control by setting module variables (e.g. enable_encryption = true).

Prevent → Maintain an internal approved module that already passes policy, and pin module versions.

All DevSecOps questions

More on Container image and IaC scanning