Skip to main content
ToolPublished

I scanned TerraGoat with three different IaC scanners — each found completely different things

Source Reddit Cybersecurity

0

Discussion

This report analyzes the results of scanning the TerraGoat deliberately vulnerable Terraform repository with three different Infrastructure as Code (IaC) security scanners: Checkov, Trivy, and pq-audit. Each scanner identified distinct sets of findings due to differing threat models and coverage areas. Checkov found 56 documented vulnerabilities intended by the TerraGoat benchmark. Trivy identified 243 findings, including 187 not documented by Checkov, covering broader cloud security misconfigurations and container hardening.pq-audit, focusing on post-quantum cryptography risks, found 4 unique vulnerabilities related to cryptographic configurations. All findings were validated as true positives. The research highlights that relying on a single scanner misses significant security issues, especially in cryptographic posture and emerging threat timelines.

r/cybersecurity (opens in a new tab)u/mkscorpiosec0 points0 comments

TerraGoat is Bridgecrew/Palo Alto's deliberately vulnerable Terraform repository. I used it as a benchmark to compare how different IaC scanners model security risk.

Setup: Three scanners, same codebase (AWS + Azure + GCP + AliCloud Terraform configs).

Results

Checkov (made by Bridgecrew, same company that made TerraGoat): 56 findings
These are the official documented vulnerabilities. The benchmark the repo was designed around.

Trivy (trivy fs --scanners misconfig): 243 findings
187 of these are NOT in Checkov's documentation. Same code, different scanner, 77% gap.

Both are correct — Trivy covers AWS CIS benchmarks, K8s pod security, container hardening, and cloud network exposure beyond what's intentionally documented in TerraGoat.

pq-audit (post-quantum crypto scanner): 4 findings
Zero overlap with Trivy or Checkov. Different threat model entirely.

[BROKEN_NOW] azure/app_service.tf:29 — Min TLS 1.0/1.1 configured [BROKEN_NOW] alicloud/bucket.tf:7 — ACL public-read-write [SNDL_VULNERABLE] azure/key_vault.tf:36 — key_type = "RSA" [SNDL_VULNERABLE] aws/db-app.tf:150 — SG egress 0.0.0.0/0 
  • BROKEN_NOW: exploitable today with classical attacks. No quantum computer required.
  • SNDL_VULNERABLE: Store-Now-Decrypt-Later. The data or keys protected by these configurations can be harvested today and decrypted when Cryptographically Relevant Quantum Computers arrive (~2030s per NIST projections).

All 4 validated with a RAG-powered triage pipeline: 4/4 TRUE_POSITIVE, 0% false positive rate.

The takeaway

None of these scanners is wrong. They encode different threat timelines:

  • Checkov: "what's intentionally vulnerable in this benchmark?"
  • Trivy: "what's misconfigured by current K8s/cloud hardening standards?"
  • pq-audit: "what cryptography will break — either today or when quantum computers arrive?"

If you're building a Terraform security pipeline, running only Checkov misses 77% of what Trivy catches. Running both misses the crypto posture gaps that pq-audit surfaces.

Links

Update note: A v3 re-scan with new cloud patterns added two more findings (Azure Key Vault RSA and AliCloud bucket ACL) that weren't in the original v2 scan. The triage pipeline confirmed all 4 as TRUE_POSITIVE.

Happy to answer questions about methodology or findings.

References

Community reviews

Loading reviews…