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.
More on Supply Chain, SBOM, Signing and Image/IaC Scanning
What is a software supply chain attack? Give examples.BeginnerExplain dependency confusion and typosquatting.IntermediateWhat is an SBOM and why do we need one?BeginnerCycloneDX vs SPDX: how do they differ?IntermediateHow do you generate and use an SBOM with Syft and Grype?BeginnerWhat is VEX?Intermediate