scan_terraform
Identify security misconfigurations in Terraform HCL source code by scanning for issues like public-read S3 buckets, open security groups, and unencrypted RDS instances, with severity-graded findings per resource block.
Instructions
Scan Terraform HCL source for security misconfigurations.
Returns findings (severity-graded) tied to specific resource blocks — e.g.
aws_s3_bucket with acl = public-read, aws_security_group with
cidr_blocks = 0.0.0.0/0 on sensitive ports, aws_rds_instance with
storage_encrypted = false.
When to use: You have existing Terraform code (not an ArchSpec) and want
an immediate security audit. For ArchSpec-level audit, use security_scan.
Behavior: Pure computation — no LLM, no network. Does not run Terraform or touch cloud. Safe for scanning untrusted HCL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hcl_content | Yes | Raw Terraform HCL source code to scan. Typically the contents of a `main.tf` file or a concatenated module. The scanner parses resource blocks directly; no terraform binary is invoked. |