feat(lab6): Checkov + KICS comparison across Terraform/Ansible/Pulumi + custom policy#1167
Open
Meliman1000-7 wants to merge 18 commits into
Open
feat(lab6): Checkov + KICS comparison across Terraform/Ansible/Pulumi + custom policy#1167Meliman1000-7 wants to merge 18 commits into
Meliman1000-7 wants to merge 18 commits into
Conversation
feat(lab1): juice shop deploy + PR template + triage report
feat(lab2): Threagile threat model + secure variant + auth flow bonus
feat(lab3): SSH commit signing + gitleaks pre-commit + history rewrite
feat(lab4): SBOM generation + SCA with Syft/Grype + Trivy comparison + sign-ready attestation
feat(lab5): ZAP baseline + authenticated DAST + Semgrep SAST + SQL injection correlation
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.
Goal
Compare IaC security scanning tools (Checkov, KICS) across three IaC formats — Terraform, Ansible, Pulumi — analyze severity/rule-frequency breakdowns, evaluate tool-selection tradeoffs, and write a custom Checkov policy to catch an organization-specific misconfiguration.
Changes
Testing
Task 1 — Checkov on Terraform
checkov -d labs/lab6/vulnerable-iac/terraform --output cli --output json --output-file-path labs/lab6/results/checkov-terraform/
49 passed, 78 failed, 0 skipped
jq '[.[0].results.failed_checks[].check_id] | group_by(.) | map({rule: .[0], count: length}) | sort_by(-.count) | .[:5]' labs/lab6/results/checkov-terraform/results_json.json
top rule: CKV_AWS_289 / CKV_AWS_355 (IAM wildcard actions/resources), 4 hits each
Task 1 — Checkov on Pulumi (only secrets framework fires; no native Pulumi support)
checkov -d labs/lab6/vulnerable-iac/pulumi --output cli --output json --output-file-path labs/lab6/results/checkov-pulumi/
1 failed (hardcoded apiKey, CKV_SECRET_6)
Task 2 — KICS on Ansible
docker run --rm -v "$(pwd)/labs/lab6:/path" checkmarx/kics:latest scan -p /path/vulnerable-iac/ansible/ -o /path/results/kics-ansible/ --report-formats json,sarif
CRITICAL:0 HIGH:9 MEDIUM:0 LOW:1 INFO:0 TOTAL:10
Task 2 — KICS on Pulumi
docker run --rm -v "$(pwd)/labs/lab6:/path" checkmarx/kics:latest scan -p /path/vulnerable-iac/pulumi/ -o /path/results/kics-pulumi/ --report-formats json,sarif
CRITICAL:1 HIGH:2 MEDIUM:1 LOW:0 INFO:2 TOTAL:6
Bonus — custom Checkov policy
checkov -d labs/lab6/vulnerable-iac/terraform --external-checks-dir labs/lab6/policies --output cli --output json --output-file-path labs/lab6/results/checkov-custom/
jq '.[0].results.failed_checks[] | select(.check_id | startswith("CKV2_CUSTOM_"))' labs/lab6/results/checkov-custom/results_json.json
2 FAILED, severity HIGH: aws_db_instance.unencrypted_db, aws_db_instance.weak_db
Artifacts & Screenshots
Checklist