Interview Prep/DevSecOps/Container image and IaC scanning

`terraform plan` scanning with Checkov fails: `Unable to parse plan: unsupported format version`

IntermediateTroubleshootingContainer image and IaC scanning
Answer

Likely causes → An old Checkov version that does not understand the plan JSON from a newer Terraform/OpenTofu release, or the file is binary tf.plan instead of JSON.

Diagnose →

checkov --version; terraform version
head -c 200 tf.json

Fix → Convert with terraform show -json tf.plan > tf.json, and upgrade Checkov (pip install -U checkov) or use the current container image.

Prevent → Pin scanner versions in CI and bump them alongside Terraform upgrades via Renovate.

All DevSecOps questions

More on Container image and IaC scanning