What is a Checkov baseline?
IntermediateConceptCheckov
Answer
Short answer
A baseline is a file recording the current failing checks in a repository. Later scans with --baseline report and fail only on new issues not in the baseline — letting you adopt Checkov on a large existing codebase without blocking every PR on day one.
Commands
checkov -d infra/ --create-baseline # writes infra/.checkov.baseline
git add infra/.checkov.baseline && git commit -m "Checkov baseline"
checkov -d infra/ --baseline infra/.checkov.baseline # only new findings fail
Process
- Create the baseline.
- Create tickets to burn down baseline findings, highest risk first.
- Enforce "no new findings" immediately.
- Regenerate the baseline as issues are fixed (it should only shrink).
What to say in the interview
"A baseline captures existing failures so CI blocks only new misconfigurations. It's how we introduce Checkov on legacy Terraform, while a backlog of baseline issues is burned down and the baseline only ever shrinks."
More on Checkov
What is Checkov and how do you scan Terraform with it?BeginnerWhat is IaC security scanning and why is it needed?BeginnerWhat is Checkov?BeginnerHow do you scan Terraform code with Checkov?BeginnerWhy scan the Terraform plan with Checkov instead of only the .tf files?IntermediateHow do you scan Kubernetes manifests and Dockerfiles with Checkov?Beginner