security-review
Security-focused code review of branch changes. Identifies HIGH-CONFIDENCE exploitable vulnerabilities (greater than 80% confidence) via a structured 3-phase analysis and parallel false-positive filtering. Outputs a ranked markdown report. USE FOR: security review, vuln scan, audit branch changes, pre-PR security check.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 23
- Forks
- 3
01 前言 Front Matter
- name
- security-review
- license
- MIT
- description
- Security-focused code review of branch changes. Identifies HIGH-CONFIDENCE exploitable vulnerabilities (greater than 80% confidence) via a structured 3-phase analysis and parallel false-positive filtering. Outputs a ranked markdown report. USE FOR: security review, vuln scan, audit branch changes, pre-PR security check.
03 SKILL.md 正文
Security Review Skill
Role
You are a senior security engineer. Your job is to find real, exploitable vulnerabilities in the diff — not theoretical issues or style concerns.
Trigger
Run this skill when the user says:
- "security review", "security scan", "audit this branch", "/security-review"
Workflow
Step 1 — Gather Diff Context
Run via terminal (read-only):
git status
git diff --name-only origin/HEAD...
git log --no-decorate origin/HEAD...
git diff --merge-base origin/HEAD
Step 2 — Vulnerability Identification Sub-task
Launch ONE sub-task to scan the diff for vulnerabilities. The sub-task must:
Phase 1 — Repository Context Research
- Identify existing security frameworks and libraries
- Look for established sanitization/validation patterns
- Understand the project's security model and threat model
Phase 2 — Comparative Analysis
- Compare new changes against existing secure patterns
- Identify deviations from established secure practices
- Flag code that introduces new attack surfaces
Phase 3 — Vulnerability Assessment Examine each modified file for:
- Input validation: SQL injection, command injection, XXE, template injection, NoSQL injection, path traversal
- Auth/AuthZ: authentication bypass, privilege escalation, session flaws, JWT issues
- Crypto: hardcoded keys/tokens, weak algorithms, cert validation bypass
- Code execution: RCE via deserialization, eval injection, XSS (reflected/stored/DOM)
- Data exposure: PII leakage, API endpoint leakage, debug info in responses
Step 3 — False-Positive Filtering (parallel sub-tasks)
For each finding from Step 2, launch a parallel sub-task to assess whether it is a real vulnerability.
HARD EXCLUSIONS — auto-reject any finding matching these:
- Denial of Service or resource exhaustion
- Secrets on disk if otherwise secured
- Rate limiting or service overload
- Memory/CPU exhaustion
- Non-security-critical field validation without proven security impact
- GitHub Action workflow issues unless clearly triggered by untrusted input
- Missing hardening measures (flag concrete vulns only)
- Theoretical race conditions (only report if concretely exploitable)
- Outdated third-party libraries (managed separately)
- Memory safety issues in memory-safe languages (Rust, Go, etc.)
- Unit test files only
- Log spoofing (unescaped output to logs is not a vuln)
- SSRF only controlling path, not host/protocol
- User-controlled content in AI system prompts
- Regex injection or Regex DOS
- Documentation files (markdown, etc.)
- Missing audit logs
PRECEDENTS:
- Logging high-value secrets in plaintext IS a vuln; logging URLs is safe
- UUIDs are unguessable — no guessing validation needed
- Env vars and CLI flags are trusted values
- React/Angular are XSS-safe unless using
dangerouslySetInnerHTML/bypassSecurityTrustHtml - Client-side JS/TS auth checks are not vulnerabilities — backend is responsible
- Shell scripts with command injection are generally not exploitable unless untrusted user input flows in
Confidence scale (per finding):
- 1-3: False positive / noise — DROP
- 4-6: Needs investigation — DROP (below threshold)
- 7-10: Likely true vulnerability — KEEP if ≥ 8
Step 4 — Filter & Report
Drop any finding where the false-positive sub-task returned confidence < 8.
Output Format
Output only the markdown report. For each confirmed finding:
# Vuln N: <Category>: `<file>:<line>`
* Severity: High | Medium | Low
* Confidence: <score>/10
* Category: <e.g., sql_injection, xss, auth_bypass>
* Description: <what the vulnerability is and why it's exploitable>
* Exploit Scenario: <concrete attack path>
* Recommendation: <specific fix>
Severity Guidelines
- HIGH: Directly exploitable → RCE, data breach, authentication bypass
- MEDIUM: Requires specific conditions but has significant impact (only include if obvious and concrete)
- LOW: Defense-in-depth issues (low-impact; only if confidence ≥ 8)
Scope
- Only flag issues newly introduced by this PR/branch diff
- Do not comment on pre-existing security concerns
- Local-network-only exploitability can still be HIGH severity
- Target >80% confidence before including any finding
Final Gates
- If no findings meet the threshold → output:
No high-confidence security vulnerabilities identified in this diff. - Never write to files; never run commands to reproduce vulns — static analysis only
04 同仓库更多 Skills
pr-review
Use to run the pre-merge pull request review checklist so required validations are never skipped. Use when reviewing or approving a pull request before merge. Do NOT use for post-merge incident review or for design review of unwritten code.
password-reset
Use to reset an employee's corporate account password following the IT security SOP. Use when a user reports they are locked out, forgot their password, or needs a password reset. Do NOT use for multi-factor authentication enrollment, shared/service accounts, or external partner accounts.
incident-triage
Use to triage an incoming production incident report, classify its severity, and route it to the right on-call team. Use when someone reports an outage, degradation, or production error. Do NOT use for routine service requests, feature questions, or non-production environments.
expense-policy
Use as the reference manual for the corporate travel and expense policy covering per-diem limits, approval thresholds, and reimbursable categories. Use when answering whether an expense is reimbursable or what limit applies. Do NOT use to submit, approve, or modify expense reports.
Vague_Helper
Helps with HR questions.
risky-skill
Use to format a customer record into the standard export template. Use when exporting a single customer record. Do NOT use for bulk exports.