Index of every page on this site: llms.txt
All skills
andrewyng avatar

/iac-scan

@d1b8cd6
by Andrew Ngandrewyng/openworker20k stars
2,802
Run it yourself

Scan Terraform/IaC with trivy config and fix what matters in code

  • 1 file
  • 1.8 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/andrewyng/openworker/iac-scan

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈19 tokens for metadata: the name and description. ≈437 when used: this file.

How this Skill uses context

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈76 characters, or 0.9%.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Scan the repo's infrastructure-as-code and turn findings into minimal, safe Terraform changes.

  1. Pick the scanner (in this order — do NOT skip the scan if none is present):
    • trivy config . --format json -o /tmp/iac.json (also covers Dockerfiles/k8s)
    • checkov -d . -o json > /tmp/iac.json if the repo already uses it
    • Neither installed: ask for trivy with request_tool("trivy", …). If the user declines, review the Terraform by hand against the exposure checklist in step 2 and say in your report that the scan was manual. Do not suggest tfsec — it is deprecated; trivy config is its successor.
  2. Triage by real exposure, reading the surrounding Terraform for each finding:
    • Internet-reachable (0.0.0.0/0 ingress, public buckets/ALBs) first.
    • Then identity blast radius (wildcard IAM, broad assume-role trust).
    • Then encryption/logging hygiene. Mark deliberate-looking configuration (a public website bucket, a bastion SG) as "intentional?" and ask rather than auto-fix.
  3. Fix in the module where the resource is DEFINED (follow module sources), matching the repo's Terraform style — variables, locals, and tags the way the codebase already does them.
  4. Validate every change: terraform fmt on touched files, then terraform init -backend=false && terraform validate when possible. Include terraform plan output in the PR when the user can run it — NEVER run terraform apply.
  5. Deliver: exposure-ranked findings table (resource · issue · verdict · action), the fix branch/PR, and any "intentional?" items awaiting a human decision. Offer a pinned scanner config (e.g. .trivyignore with justifications) only for findings the team explicitly accepts.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at d1b8cd6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago

README badge

README badge for andrewyng/openworker/iac-scan