一键导入
remy-secure
Review branch changes for security vulnerabilities. Multi-stage: regex pre-scan, parallel agents, and false-positive filtering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review branch changes for security vulnerabilities. Multi-stage: regex pre-scan, parallel agents, and false-positive filtering.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Discover and run tests after code modification. Supports multi-angle defect prediction and coverage analysis. Recommended after large-scale edits or accumulated working tree changes.
Scan source files (Python, C/C++, TypeScript) and generate semantic logic index via LLM. Index is injected into CLAUDE.md and used by hooks/skills for dependency analysis. Run after repo init or major changes.
Deep repository analysis with multi-agent parallel perspectives. Requires /init + /remy-index as prerequisites. Produces structured research reports.
Diagnose bugs via hypothesis loop with circuit breaker. Diagnosis only — produces evidence packets for /remy-patch without modifying code.
Audit architecture for risks, side effects, and ambiguities before writing code. Produces evidence packets for /remy-patch. Recommended for large or complex tasks.
Verify code changes via Intent/Log/Code triangulation. Independent blind audit without prior session context. Paired with /remy-changelog: generate log, rewind context, then audit.
| name | remy-secure |
| description | Review branch changes for security vulnerabilities. Multi-stage: regex pre-scan, parallel agents, and false-positive filtering. |
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/remy-secure/...")to access them.
| File | Purpose |
|---|---|
skills/remy-secure/rules/exclusions.json | Hard exclusion rules for false-positive filtering. User-extensible. |
skills/remy-secure/rules/precedents.json | Precedent judgments for contextual filtering. User-extensible. |
skills/remy-secure/rules/patterns.json | Phase 0 deterministic regex patterns (dangerous functions, hardcoded secrets). |
skills/remy-secure/prompts/scan_injection.md | Agent A: SQL/Cmd/Path/Template/NoSQL/XXE injection. |
skills/remy-secure/prompts/scan_auth.md | Agent B: Auth bypass/privilege escalation/session/JWT. |
skills/remy-secure/prompts/scan_data_exposure.md | Agent C: PII logging/API leakage/debug exposure. |
skills/remy-secure/prompts/scan_crypto.md | Agent D (high only): Weak algorithms/hardcoded keys/key storage. |
skills/remy-secure/prompts/scan_deserialization.md | Agent E (high only): Pickle/YAML/eval/exec. |
skills/remy-secure/prompts/filter_false_positive.md | False-positive filter agent prompt. |
skills/remy-secure/schemas/vulnerability_finding.json | Output schema for category agents. |
skills/remy-secure/schemas/filter_result.json | Output schema for filter agents. |
skills/remy-secure/templates/report.md.j2 | Markdown report template. |
skills/remy-secure/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. |
/remy-secure [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.db exists in the project:
python "~/.claude/skills/remy-index/impact.py" <changed_files...>remy-index MCP server is active, query_impact / query_callers tools provide equivalent data without subprocess overhead.Read prompt templates from ~/.claude/skills/remy-secure/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_secure/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_secure/security_audit_{timestamp}.md