ci(infra): run tfsec + checkov on Terraform plan in CI - #373
Merged
snowrugar-beep merged 6 commits intoJul 28, 2026
Merged
Conversation
Add IaC security scanning gate that runs tfsec and checkov against all Terraform changes on pull requests and pushes to main. - .github/workflows/terraform-scan.yml: CI workflow with two parallel jobs running tfsec and checkov against infrastructure/terraform/ directory - infrastructure/terraform/.tfsec.yml: tfsec config enforcing HIGH minimum severity Closes VertexChainLabs#166
- tfsec: change format from 'table' to 'text' (table is not a valid format for aquasecurity/tfsec-action) - checkov: add .checkov.baseline to acknowledge 85 pre-existing findings so CI only fails on new regressions - Workflow: add baseline and quiet params to checkov step
…ive on ALB - Fix checkov baseline path to be relative to workspace root (infrastructure/terraform/.checkov.baseline) instead of scan dir - Add tfsec:ignore for aws-ec2-no-public-ingress-sgr on ALB security group — ALB must accept public HTTP(S) traffic by design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an IaC security scanning gate to CI by running tfsec and checkov against all Terraform changes on pull requests and pushes to main.
Problem
No IaC security gate exists for Terraform changes. A misconfigured S3 bucket or public RDS is a P0 incident waiting to happen.
Changes
.github/workflows/terraform-scan.yml— New CI workflow with two parallel jobs:aquasecurity/tfsec-action@v1.0.3with table output. Fails on HIGH/CRITICAL findings.bridgecrewio/checkov-action@v12with CLI output. Fails on any FAILED evaluation.infrastructure/terraform/.tfsec.yml— tfsec configuration enforcingminimum_severity: HIGH, so only HIGH and CRITICAL issues gate the pipeline.Triggers
maintouchinginfrastructure/terraform/**maintouchinginfrastructure/terraform/**workflow_dispatchfor ad-hoc scansAcceptance Criteria
soft_fail: false)Closes #166