A skipped Checkov check leaves no trace, so write down why
Scan before the client's security team reads your Terraform and the answers sit in the code, rather than in a string of on-the-spot questions.
In brief
- Checkov ships more than 1,000 built-in policies and, since version 2.0, scans with awareness of dependencies between resources.
- Checks disabled with --skip-check vanish from the results. A skip comment with a reason stays readable to reviewers.
- Plans and terraform show -json can expose sensitive values, so scan plans only in a secure CI pipeline.
Checkov’s documentation carries a warning: a skipped check does not run, and it does not appear in the results either. That small detail shapes a good deal of the security review that comes before your Terraform goes into a client’s cloud account.
The client’s security team will read every resource and ask why it is configured the way it is. If they find the problems first, the review becomes a series of questions you have to answer on the spot. If you scan beforehand, fix what needs fixing and write the reason next to each exception, the answers are already in the code.
Checkov is an open-source static analysis tool for infrastructure as code. It was created by Bridgecrew, which Palo Alto Networks acquired in March 2021.
Checkov reads Terraform as a graph
According to the project’s README, Checkov has more than 1,000 built-in security and compliance policies for AWS, Azure and Google Cloud. Every finding is tied to a specific check, so you and the security team can discuss that check rather than argue in general terms about whether “this bucket is fine”.
Since version 2.0, Checkov has used a graph-based framework, so its scans take dependencies between resources into account. This matters because many misconfigurations only surface when you look at how resources relate: a resource can look fine on its own yet lack something that should accompany it.
The approach is clearest in custom policies written in YAML, where a connection block lets you check whether one resource type is or is not linked to another. When the client has internal rules that the built-in policies do not cover, this is where you write new ones.
One caution before installing: the checkov package on PyPI is currently at version 3.4.14, released on December 1, 2026. It requires Python 3.10 or later, and the README lists 3.13 as the upper limit. Check the Python version on the client’s jump box or CI runner before your first day, so there is time to request the right one.
The first scan inside the client’s network
A minimal scan takes two commands:
pip install checkov
checkov --directory infra/ --skip-download
The --skip-download flag matters when you work inside a client’s network. By default, Checkov calls the Prisma Cloud API to add remediation guidance links to its results. The security team should be told in advance about every outbound connection your tools open, and until they have been, the safest course is to turn it off.
Checkov’s documentation describes the --soft-fail option (short form -s): with it, Checkov always returns exit code 0, whatever the scan finds. The converse follows: without -s, a scan with failures returns a non-zero code and fails the CI step. That is how Checkov becomes a merge gate.
What if a legacy repo turns the screen red?
Take a Terraform repo that has run in production for years. The first scan fills the screen with failures, and nobody will give you two weeks to fix all the old ones.
There are two tempting reflexes. The first is acceptable: switch on --soft-fail temporarily so the pipeline keeps running while you and the client triage the failures, provided the whole team agrees a date to turn it off.
The second is a common mistake: adding --skip-check to the CI command until the build goes green. Those checks will not run and will disappear from the results, so whoever reads the report has no idea what was skipped.
The fix is to skip individual checks on the specific resource with a comment in the code. Checkov’s documentation describes using comments or annotations for this, a far narrower scope than disabling a check for the whole run. Replace <CHECK_ID> with the ID of the check your scan reports as failing for that resource:
resource "aws_s3_bucket" "static_site" {
# checkov:skip=<CHECK_ID>:Bucket only holds the website's public static files, approved by the security team
bucket = "static-site"
}
The reason is what the security team needs to read. Amaresh Pelleti, in a guide to Checkov on GitHub Actions, advises treating every skip without a reason as a flag for review, because a reader cannot tell whether someone genuinely weighed the risk or simply wanted to silence the warning.
Scan the plan, but not on your laptop
The .tf files do not always show everything that will be deployed, so Checkov can also scan a Terraform plan. The process takes three commands:
terraform plan -out tfplan
terraform show -json tfplan > tfplan.json
checkov -f tfplan.json --skip-download
This is where the second common mistake lies. HashiCorp confirms that Terraform stores values marked sensitive in both state files and plan files, and that when you use terraform show with the -json flag, sensitive values in state appear in plain text.
Checkov’s documentation therefore recommends evaluating plans only in a secure CI/CD pipeline, since a plan can contain secrets injected at run time.
The right approach is to run the plan scan in the client’s CI, never store tfplan.json as a public artifact, and never copy the file to a laptop just to try something out.
What to learn first, and how to put it on a CV
A sensible order is to scan a directory and learn to read the results first. Then learn to write skips with reasons, followed by temporary use of --soft-fail, plan scanning in CI and, finally, YAML policies with connection blocks.
When an FDE job posting mentions Terraform, IaC or compliance, these are skills you can demonstrate with a demo repo.
The client’s security team will still read your Terraform. This time, every exception they come across will already have its reason written beside it.
Was this article useful?
Thanks for the feedback!
10 sources
- Checkov README (bridgecrewio/checkov)
- Checkov 2.0 Launches as the First Open-Source Cloud Infrastructure Scanner With Dependency Awareness · 2021-04-08
- checkov · PyPI · 2026-12-01
- Suppressing and Skipping Policies - checkov
- Checkov in GitHub Actions: Fail PRs on New Terraform Issues · Dec 3
- Hard and soft fail - checkov
- Terraform Plan Scanning - checkov
- Manage sensitive data in your configuration | Terraform | HashiCorp Developer
- terraform show command reference | Terraform | HashiCorp Developer
- YAML Custom Policies - checkov