Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
Checkov is an open-source static analysis tool that scans infrastructure as code — Terraform, CloudFormation, Kubernetes, Helm, Bicep, and more — against more than a thousand built-in policies.

What Is Checkov?
Checkov is an open-source static analysis tool for infrastructure as code. Point it at a directory and it parses Terraform, CloudFormation, Kubernetes manifests, Helm charts, ARM and Bicep templates, Dockerfiles, Serverless Framework definitions, and GitHub Actions workflows, then evaluates them against more than a thousand built-in policies. Each failure comes back with a check ID, the file and line, and a one-line explanation of what is wrong.
It was written in Python by Bridgecrew, which Palo Alto Networks acquired in 2021. The command-line tool remains Apache-2.0 licensed and usable without any account.
The basic invocation is unremarkable: checkov -d . walks a directory and prints passed and failed checks. In practice the flags matter more than the command:
--framework terraform narrows the scan when a repository holds several kinds of definition and the run is slow.--compact --quiet suppresses the passed checks, which otherwise bury the failures.--soft-fail reports without setting a non-zero exit code, which is how you introduce the tool to an existing repository without blocking every pull request on day one.--output sarif produces a file that GitHub code scanning, GitLab, and most review tools will render inline on the diff.--baseline .checkov.baseline accepts the current findings as the starting point so that only new misconfigurations fail the build.The most common reason Checkov misses something is that the answer lives in a variable. A bucket whose encryption setting comes from var.encryption_enabled cannot be judged from the HCL alone. Running the tool against a Terraform plan in JSON form solves this, because the plan has every value resolved:
terraform plan -out tfplan.binary
terraform show -json tfplan.binary > tfplan.json
checkov -f tfplan.json --framework terraform_plan
Teams that only scan source files tend to carry a quiet set of false negatives for months. Scanning both the source on commit and the plan before apply is the pattern worth copying.
Checkov 2.0 added a graph engine that models relationships between resources rather than treating each block in isolation. That is what allows a check to say that a security group is attached to an internet-facing load balancer, or that a bucket policy and the bucket itself combine into a public exposure, rather than merely noting that a single attribute is set oddly.
Custom policies can be written in Python for complex logic or in YAML for attribute and connection-state conditions, then loaded with --external-checks-dir. This is where most of the value sits for a mature team: the built-in checks cover generic hardening, while your own rules encode the things only your organisation cares about, such as a mandatory cost-centre tag, an approved region list, or a ban on a particular module version. Writing those rules is a form of policy as code, and the same conditions can usually be mirrored in an admission controller so that the rule applies at deploy time as well as at review time.
Every IaC scanner needs an escape hatch, and every escape hatch becomes permanent unless you plan for it. Checkov suppressions are inline comments:
#checkov:skip=CKV_AWS_18:Access logging handled centrally by the platform account
The reason after the second colon is not optional in practice — a skip without a justification is indistinguishable from a bug, and reviewers cannot judge it. Repository-wide skips using --skip-check in the CI configuration are harder to audit, because the file nobody reads is the pipeline definition. Keep them in the code they apply to.
Checkov is one of several tools in the same space, alongside tfsec, KICS, Terrascan, and the misconfiguration scanner inside Trivy. They overlap heavily; the sensible approach is to pick one, tune it until the signal is trustworthy, and resist running three at once. Checkov’s breadth of supported formats and the ease of writing YAML custom checks are the usual reasons teams land on it.
What it cannot tell you is whether the deployed estate matches the code. Drift, manual console changes, and resources created outside the pipeline all sit outside its view, which is why IaC scanning belongs next to a posture management tool rather than in place of one. At Privia Security, we review both sides of that gap as part of our cloud security services.
The command-line tool is open source under the Apache 2.0 licence and needs no account, API key, or subscription. Palo Alto Networks sells Prisma Cloud, which uses the same policy engine and adds a hosted interface, drift detection, pull request feedback, and reporting across many repositories. Most teams start with the free CLI in CI and only consider the commercial product once they need central reporting.
Both, at different points. Scanning source files on every commit gives immediate feedback and catches obvious mistakes early. Scanning the JSON output of a Terraform plan just before apply resolves variables, data sources, and module inputs, so it catches the misconfigurations that are invisible in raw HCL. Teams that only do the first tend to accumulate false negatives they never notice.
Generate a baseline file that records the findings that already exist, commit it, and pass it with the baseline flag. New code is then held to the full policy set while existing debt is tracked separately rather than blocking every change. Review the baseline periodically and shrink it deliberately, otherwise it becomes a permanent exemption list that nobody reads.
No. Checkov sees the code in your repository, not the resources running in your accounts. Anything created by hand in the console, changed by an operator during an incident, or deployed by a pipeline that bypasses review is invisible to it. Static IaC scanning and runtime posture management answer different questions, and organisations serious about cloud configuration run both.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.