Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

tfsec

$ tfsec Official Low Risk
Aqua Security · Code & DevOps · MIT · macos / linux / windows

Fast Go-based static security scanner for Terraform HCL configurations checking AWS, Azure, GCP, and Kubernetes misconfigurations. Supports --format json, --no-color, and --soft-fail; note that Aqua Security has merged tfsec into trivy config.

FCRS-1.0 Score
74 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install tfsec
CLI vs MCP Decision CLI Only

Scans local Terraform HCL files offline; use trivy config for active rule updates.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports --format json, --no-color, --soft-fail, --minimum-severity, and --concise-output.

  • --format json and --minimum-severity return clean structured JSON
Trust & Safety 22 / 25

Strictly read-only static HCL scanner; does not invoke terraform providers or access cloud APIs.

  • Offline HCL AST analysis with zero writes or cloud calls
Setup & Portability 13 / 15

Single static Go binary via Homebrew, go install, and GitHub Releases.

  • Zero-dependency binary across macOS, Linux, and Windows
Utility & Efficiency 9 / 15

Useful on legacy Terraform repos pinned to tfsec, though new checks ship in trivy config instead.

  • Superseded by Aqua Security's trivy config
Maintenance & Lineage 3 / 10

Official Aqua Security repo (aquasecurity/tfsec), but archived/deprecated as standalone checks migrated into Trivy.

  • Merged into aquasecurity/trivy (trivy config); standalone tfsec is in maintenance/deprecation
Docs & Verifiability 7 / 10

Existing docs at aquasecurity.github.io/tfsec/ remain readable with migration notices to Trivy.

  • Official docs and Trivy migration notes

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

Offline local Terraform HCL scanner; no cloud credentials required.

Side Effects
Read-Only
Cost & Quotas

MIT open-source Go binary; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# tfsec Agent Rules
- Pass `--format json --no-color` (and `--soft-fail` if collecting findings without aborting).
- Prefer `trivy config --format json` on new projects since `tfsec` has been merged into Trivy.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan Terraform directory with JSON output
tfsec . --format json --no-color --minimum-severity MEDIUM

Emits JSON misconfiguration findings at MEDIUM+ severity without modifying Terraform files.

Strengths for Agents

  • + Fast single static Go binary with --format json, --minimum-severity, and --soft-fail.
  • + Offline read-only HCL scanning requires no cloud credentials or terraform init.

Caveats & Pitfalls

  • ! Deprecated/merged into trivy (trivy config); rule definitions no longer receive active updates in standalone tfsec.
  • ! Scanning uninitialized external remote modules may miss module-internal issues without --run-tf-checks or cached .terraform.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI