Menu

Checkov in GitHub Actions: Fail PRs on New Terraform Issues
📰

Checkov in GitHub Actions: Fail PRs on New Terraform Issues

DEV Community: terraform·Amaresh Pelleti·1 day ago
#qeLoLkz9
#devtoterraform#devto#dev#checkov#baseline
Long article (1780 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on DevToolHub .

To run Checkov in GitHub Actions, install it with pip install checkov==3.4.11 and scan the Terraform directory on every pull request that changes it. The catch is the first run. A two-resource file produced 9 failed checks, so a plain gate would fail the first pull request. A baseline file helps with that, but it has a hole I found in testing.

I tested on 30 November 2026 with Checkov 3.4.11, locally in Docker and on a GitHub-hosted runner, using a throwaway Terraform file with an S3 bucket and a security group. On 1 December 2026 I re-ran the baseline cases locally on Checkov 3.4.14 and got the same results.

In this guide:

Add a Checkov job that fails the pull request on Terraform findings

Use a baseline so findings it does not cover fail the build

Spot the case where the baseline hides a new, unsafe resource

Skip a check on purpose and keep the reason in the code

How do you run Checkov in GitHub Actions?

Trigger a job on pull requests that touch your Terraform,…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.