iac-scan
Skill by andrewyng
Scans Terraform and other infrastructure-as-code with trivy config and turns the findings into minimal, safe Terraform fixes. Built for engineers who review IaC changes in a repository.
Install iac-scan
Built from the published package, never by AI.
git clone --depth 1 https://github.com/andrewyng/openworker /tmp/openworker && mkdir -p ~/.claude/skills && cp -r /tmp/openworker/coworker/personas/builtin/cloud-posture/skills/iac-scan ~/.claude/skills/iac-scanRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/andrewyng/openworker /tmp/openworker && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/openworker/coworker/personas/builtin/cloud-posture/skills/iac-scan ~/.gemini/antigravity-cli/skills/iac-scanAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
iac-scan is an agent skill that scans a repository's infrastructure-as-code with trivy config and turns the findings into minimal, safe Terraform changes. It prefers trivy, uses checkov if the repo already uses it, and asks for trivy if neither scanner is installed. If the user declines, it reviews the Terraform by hand and says so in the report.
Findings are triaged by real exposure: internet-reachable resources first, then identity blast radius such as wildcard IAM, then encryption and logging. Fixes go in the module where the resource is defined, following the repo's existing style. Each change is checked with terraform fmt and terraform validate, and the skill never runs terraform apply. It is aimed at engineers who want a ranked findings table and a fix branch or PR.
Written from the project's SKILL.md and checked against it.
What it can do
- Infrastructure scanRuns trivy config on the repo, or checkov if the repo already uses it.
- Exposure triageRanks findings by internet exposure, identity blast radius, then encryption and logging.
- Intentional checkFlags deliberate-looking config, such as a public website bucket, and asks before changing it.
- Module-level fixesApplies changes in the module where the resource is defined, matching the repo's Terraform style.
- Change validationRuns terraform fmt and terraform validate on touched files when possible.
- Findings reportDelivers an exposure-ranked table with resource, issue, verdict and action, plus a fix branch or PR.
What you need
- trivy or checkov installed, or permission to request trivy
- Terraform CLI for fmt and validate
- A repository containing Terraform or other IaC files
Try asking
- Scan this repo's Terraform with trivy and rank the findings by exposure
- Fix the public 0.0.0.0/0 ingress rules in the Terraform modules
- Run a manual Terraform review if no IaC scanner is installed
Good to know
- Never runs terraform apply; plan output is included only when the user can run it
- Asks before auto-fixing configuration that looks intentional
- Offers a .trivyignore file only for findings the team explicitly accepts
- Does not suggest tfsec because it is deprecated
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: coworker/personas/builtin/cloud-posture/skills/iac-scan/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md2 KB
Alternatives to iac-scan
All alternatives →Retrieves lab biomarker results and clinician notes from Function Health through its FHIR API. It is for people who want an AI assistant to review their own lab history and notes.
Gives an AI assistant a methodology for finding and exploiting privilege escalation weaknesses on Windows systems during authorized penetration tests. It is for security testers and defenders validating escalation paths.
Guides the assistant through designing, debugging and hardening GitHub Actions CI/CD workflows. It is aimed at teams that run production pipelines on GitHub.
Develops evidence-backed structural security hardening proposals from disclosures, findings, source code, or Codex Security scans. It is for teams that need systemic fixes and architectural tradeoffs.
Claude Security scans code for security issues with Claude Code. It covers whole repositories, branch or pull request diffs, single commits, and existing findings from SARIF files or earlier reports.
Turns vulnerability notes, disclosure reports, PoCs, source code, or Codex Security findings into self-contained vulnerability reports. Built for security researchers who need claims the evidence supports.
Compare with function_health, windows-privilege-escalation or github-actions-advanced
iac-scan: common questions
Which scanner does iac-scan use?
It tries trivy config first, then checkov if the repo already uses it. If neither is installed, it asks for trivy.
Does iac-scan apply Terraform changes?
No. The source says it never runs terraform apply and only validates changes with fmt and validate.
What happens if no scanner is available?
If the user declines to install trivy, the skill reviews the Terraform by hand against an exposure checklist and states in its report that the scan was manual.
How do I install iac-scan?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is iac-scan free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is iac-scan safe to use?
It scores 84 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to iac-scan?
Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.
