Checkov passes on HCL, but the deployed bucket is still public
AdvancedTroubleshootingContainer image and IaC scanning
Answer
Likely causes → Values come from variables, locals, for_each or data sources that static HCL scanning cannot resolve, so the check evaluated an unknown value as compliant.
Diagnose → Scan the plan, which has resolved values:
terraform plan -out tf.plan
terraform show -json tf.plan > tf.json
checkov -f tf.json --framework terraform_plan
Fix → Gate on the plan JSON in CI in addition to HCL scanning, and fix the variable default.
Prevent → Add a runtime layer too: AWS Config rules / S3 Block Public Access at account level so a missed scan cannot expose data.
More on Container image and IaC scanning
Trivy fails the build on 14 HIGH/CRITICAL CVEs in the base image, all with "Fixed Version" emptyBeginner`FATAL ... failed to download vulnerability DB: ... TOOMANYREQUESTS: retry-after` from Trivy in CIIntermediateTrivy in an air-gapped runner fails with `failed to download vulnerability DB` even though you copied `db.tar.gz`AdvancedTrivy and Grype report different CVE counts for the same imageIntermediate`.trivyignore` entries are ignored and the build still fails on the same CVEBeginnerTrivy reports a critical CVE in a Go binary built from your own code, in package `stdlib`Intermediate