Interview Prep/DevSecOps/Supply Chain, SBOM, Signing and Image/IaC Scanning

Plan-time vs source-time IaC scanning: what is the difference?

AdvancedConceptSupply Chain, SBOM, Signing and Image/IaC Scanning
Answer

Source scanning reads .tf files; it cannot see values that resolve at plan time (variables, module outputs, data sources). Plan scanning evaluates the real resolved resources:

terraform plan -out tfplan
terraform show -json tfplan > tfplan.json
checkov -f tfplan.json --framework terraform_plan

Plan scanning has fewer false positives and catches misconfigurations produced by modules, but needs credentials and provider initialisation. We run source scans on PRs for speed and plan scans before apply.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply Chain, SBOM, Signing and Image/IaC Scanning