mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-14 00:00:58 +00:00
Security, Cloud Posture, and Dependency Audit coworkers as self-contained bundle dirs (manifest + skills) driving OSS scanners; registry loads bundle subdirs; packaging includes them.
1.5 KiB
1.5 KiB
name, description
| name | description |
|---|---|
| iac-scan | Scan Terraform/IaC with trivy or tfsec and fix what matters in code |
Scan the repo's infrastructure-as-code and turn findings into minimal, safe Terraform changes.
- Pick the scanner that's present (check in this order, ask before installing):
trivy config . --format json -o /tmp/iac.json(also covers Dockerfiles/k8s)tfsec . --format json --out /tmp/iac.jsoncheckov -d . -o json > /tmp/iac.json
- 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.
- 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.
- Validate every change:
terraform fmton touched files, thenterraform init -backend=false && terraform validatewhen possible. Includeterraform planoutput in the PR when the user can run it — NEVER runterraform apply. - 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.
.trivyignorewith justifications) only for findings the team explicitly accepts.