Goal
Find security risks in a change before it is accepted.
Inputs
- The change as a diff or summary.
- Test results, when they exist.
Workflow
- Identify changed trust boundaries: file writes, paths, dependencies, auth, stored secrets, network calls, telemetry, MCP.
- Run scripts/scan-secrets.sh over the staged diff and treat matches as blockers until cleared. If scripts/ is unavailable (deleted or cannot execute), perform the same scan by reading the diff directly.
- Check path validation, overwrite policy, and symlink handling.
- Check dependency, template, and configuration risk.
- Check that tests cover the security-sensitive behavior.
- Classify findings as blockers, risks, or documented tradeoffs.
- Hand back the verdict with the finding list.
Decisions
- If a credential is present in the change → blocker; stop and ask for its removal.
- If writes can escape the repository root → blocker.
- If the change conflicts with accepted repository memory → stop and ask for a human decision.
Verification
- Every trust boundary the change touches has a finding or an explicit all-clear.
- Blockers name the exact file and line.
- No finding is generic filler.
Resources
- For the security model → docs/20-security/SECURITY_MODEL.md
- For threat context → docs/20-security/THREAT_MODEL.md (when present)
Output
- Verdict: accept, accept with risks, or block.
- Finding list with files, lines, and severity.