skills/security-audit/SKILL.md
Security-focused code review of branch changes. Identifies high-confidence vulnerabilities via regex pre-scan, parallel category agents, and independent false-positive filtering.
npx skillsauth add till-crazy-tears-us-apart/claude-code-engineering-suite security-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Security-focused review of code changes on the current branch. Identifies exploitable vulnerabilities with high confidence (≥ 8/10), minimizing false positives through a multi-stage pipeline.
Supports three effort levels:
Path Convention: All paths below are relative to
~/.claude/. UseRead("~/.claude/skills/security-audit/...")to access them.
| File | Purpose |
| :--- | :--- |
| skills/security-audit/rules/exclusions.json | Hard exclusion rules for false-positive filtering. User-extensible. |
| skills/security-audit/rules/precedents.json | Precedent judgments for contextual filtering. User-extensible. |
| skills/security-audit/rules/patterns.json | Phase 0 deterministic regex patterns (dangerous functions, hardcoded secrets). |
| skills/security-audit/prompts/scan_injection.md | Agent A: SQL/Cmd/Path/Template/NoSQL/XXE injection. |
| skills/security-audit/prompts/scan_auth.md | Agent B: Auth bypass/privilege escalation/session/JWT. |
| skills/security-audit/prompts/scan_data_exposure.md | Agent C: PII logging/API leakage/debug exposure. |
| skills/security-audit/prompts/scan_crypto.md | Agent D (high only): Weak algorithms/hardcoded keys/key storage. |
| skills/security-audit/prompts/scan_deserialization.md | Agent E (high only): Pickle/YAML/eval/exec. |
| skills/security-audit/prompts/filter_false_positive.md | False-positive filter agent prompt. |
| skills/security-audit/schemas/vulnerability_finding.json | Output schema for category agents. |
| skills/security-audit/schemas/filter_result.json | Output schema for filter agents. |
| skills/security-audit/templates/report.md.j2 | Markdown report template. |
| skills/security-audit/render.py | Template rendering helper. |
| Environment Variable | Default | Description |
| :--- | :--- | :--- |
| SECURITY_AUDIT_EFFORT | medium | Fallback effort level when not specified as argument. |
| SECURITY_AUDIT_MAX_FILTER_AGENTS | 15 | Maximum parallel filter agents (prevents token explosion on large diffs). |
| SECURITY_AUDIT_CONFIDENCE_THRESHOLD | 8 | Minimum confidence (1-10) for a finding to appear in final report. |
/security-audit [effort] [diff_range]
low, medium, or high (case-insensitive): use as effort level, remaining arg is diff_range.SECURITY_AUDIT_EFFORT env var (default medium), first arg is diff_range.origin/HEAD...HEAD.| Effort | Phase 0 | Category Agents | Filter Agents | Total Max Agents | | :--- | :--- | :--- | :--- | :--- | | low | Yes | 0 | 0 | 0 | | medium | Yes | 3 (A, B, C) | Up to 15 | Up to 18 | | high | Yes | 5 (A, B, C, D, E) | Up to 15 | Up to 20 |
git rev-parse --show-toplevelREPO_ROOT.AskUserQuestion to ask the user for the git repository path.
git -C <path> rev-parse --show-toplevel.Using REPO_ROOT as the working directory:
git -C <REPO_ROOT> diff --name-only <diff_range> → file list.git -C <REPO_ROOT> diff <diff_range> → full diff content.Load rules from rules/patterns.json. For each pattern:
Grep with the pattern's regex against the changed files.prescan_findings: [{id, name, severity, file, line, match}].These findings are:
If effort = low: Generate report from prescan_findings only and EXIT.
Gather context for agent prompts:
prescan_findings list (so agents skip already-flagged patterns)..claude/logic_index.json exists in the project:
python "~/.claude/skills/update-logic-index/impact.py" <changed_files...>Read prompt templates from ~/.claude/skills/security-audit/prompts/.
| Effort | Agents Launched (in parallel) |
| :--- | :--- |
| medium | scan_injection.md (A) + scan_auth.md (B) + scan_data_exposure.md (C) |
| high | A + B + C + scan_crypto.md (D) + scan_deserialization.md (E) |
For each agent, construct the Agent call:
Agent({
description: "Security-audit: [category name]",
prompt: "[prompt template content]\n\n---\n\n## Provided Context\n\n### Diff\n```\n{diff}\n```\n\n### Pre-Scan Findings\n{prescan_json}\n\n### Impact Analysis (Call Graph)\n{impact_summary_or_'Not available'}"
})
Launch all agents in parallel (single message, multiple Agent tool calls).
vulnerability_finding.json schema).agent_findings list.agent_findings by severity (HIGH > MEDIUM > LOW).SECURITY_AUDIT_MAX_FILTER_AGENTS (default 15): take top-15 by severity.Read filter_false_positive.md prompt template. For each finding in the selection:
Agent({
description: "Security-audit filter: [file:line]",
prompt: "[filter template]\n\n---\n\n## Finding to Evaluate\n{finding_json}\n\n## Full Diff Context\n```\n{diff}\n```\n\n## Exclusion Rules\n{exclusions_json}\n\n## Precedent Judgments\n{precedents_json}"
})
Launch all filter agents in parallel.
filter_result.json schema).confidence score (1-10) and reasoning.confidence < SECURITY_AUDIT_CONFIDENCE_THRESHOLD (default 8).verified_findings.Combine:
prescan_findings (from Phase 0, always included)verified_findings (from Phase 2, medium/high only)Sort by severity (HIGH → MEDIUM → LOW), then by file path.
For each finding, output a Markdown block:
# Vuln {N}: {Category}: `{file}:{line}`
* Severity: {HIGH|MEDIUM|LOW}
* Confidence: {score}/10
* Description: {description}
* Exploit Scenario: {exploit_scenario}
* Recommendation: {recommendation}
Use render.save_report() to persist the report to .claude/temp_test/security_audit_{timestamp}.md.
Print a condensed summary to stdout:
Security Audit Complete
=======================
Effort: {effort_level}
Diff Range: {diff_range}
Files Analyzed: {file_count}
Pre-Scan: {prescan_count} deterministic findings
Agent Findings: {agent_count} raw → {verified_count} verified (threshold: {threshold}/10)
Final Report: {total} findings (HIGH: {h}, MEDIUM: {m}, LOW: {l})
Report: .claude/temp_test/security_audit_{timestamp}.md
data-ai
Deep repository analysis with multi-agent parallel perspectives. Requires /init + /remy-index as prerequisites. Produces structured research reports.
tools
Analyze CI/CD failure logs to diagnose build, test, and gate failures. Supports GitHub Actions (gh CLI), local log files, and pasted logs. Produces evidence packets for /remy-patch.
development
Generate persistent unit tests for existing or stub code. Supports post-hoc testing (default) and TDD mode (--tdd). Multi-angle agent analysis at medium/high effort levels.
tools
--- name: remy-secure description: Review branch changes for security vulnerabilities. Multi-stage: regex pre-scan, parallel agents, and false-positive filtering. allowed-tools: Read, Grep, Glob, Bash, AskUserQuestion, Agent argument-hint: "[low|medium|high] [diff_range (optional, e.g. HEAD~3...HEAD)]" disable-model-invocation: true --- # Security Audit Protocol Security-focused review of code changes on the current branch. Identifies exploitable vulnerabilities with high confidence (≥ 8/10),