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

  1. Create the baseline.
  2. Create tickets to burn down baseline findings, highest risk first.
  3. Enforce "no new findings" immediately.
  4. 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."

All Security Tools questions Roadmap: Checkov — IaC security

More on Checkov