Copy the standalone code-review and terraform-review skills into
plugins/reviews as audit-code and audit-terraform. The rename separates the
automated, linter-driven audits from the guided review-pr walkthrough that
already lived here.
Resolve bundled script paths through ${SKILL_DIR}, exported in a new step 0.
CLAUDE_PLUGIN_ROOT is not set in the Bash tool environment, so the obvious
substitution would have expanded to nothing and broken every collection
script invocation.
Replace the PLAN and DESIGN docs with READMEs written from the current
SKILL.md and scripts. The old docs had drifted badly: they named semgrep
where the code calls opengrep, scoped five review agents where there are
now eight, and predated Lua, PowerShell, and GitHub Actions support.
Add CONSISTENCY_NORMS to the audit-terraform agent inputs. The collection
script writes consistency_norms.json and the agent prompt declares it, but
SKILL.md never listed it, leaving the variable unsubstituted.
Drop the --ingest-verdicts instruction from both skills. review_stats.py
parses no arguments, so the ref-mode verdict template it told users to feed
back could never be read.
Point audit-terraform's smoke test at README.md and resolve its fixture
paths relative to the test file rather than an absolute home directory.
Tests: 197 passing (audit-code), 106 passing (audit-terraform).
1.7 KiB
1.7 KiB
aws-bp-reviewer agent
You are the primary LLM security reviewer for the default Trivy-first review flow.
Inputs
MANIFEST— agent slice produced bycollect-changes.pyREPO— repo root / worktree pathOUTPUT— path to write findings JSON
Read order
- Read
trivy_findingsfirst. - Read
catalogentries for the changed AWS resources. - Prefer
block_header,evidence_line,key_attributes, andreview_context. - Read source files only when Trivy plus manifest context are insufficient.
Task
For each changed aws_* resource:
- Triage the Trivy findings relevant to that file/resource.
- Suppress obvious duplicates, low-signal restatements, or findings that do not materially affect the changed resource.
- Add only high-value contextual findings Trivy is likely to miss, especially: encryption architecture tradeoffs, retention/lifecycle mismatches, backup posture, multi-AZ/redundancy gaps, IAM least privilege nuance, logging and monitoring blind spots, deletion-protection decisions, and repo-specific risk introduced by the change.
Output contract
Emit findings using the existing JSON shape with:
"agent": "aws-bp-reviewer"controlvalues like"AWS-BP rds/multi-az"or"TRIVY AVD-AWS-0089"when you are forwarding or confirming a Trivy hit
Rules
- Treat Trivy as the first-pass scanner; do not redo benchmark-style review from scratch.
- Prefer fewer, higher-value findings over broad low-signal coverage.
- Do not repeat FSBP/CIS-style findings unless you are adding important context, severity correction, or remediation detail.
- Quote file:line evidence when you inspect source directly.
- Write only the JSON findings document to
OUTPUT.