
Differential Review
SkillTrail of Bits 出品,从安全视角审查 PR、提交或 diff:结合 git blame 追溯历史、按调用方数量估算改动影响范围、检查测试覆盖缺口,输出 Markdown 审查报告。
Differential Review
Security-focused differential review of code changes with git history analysis and blast radius estimation.
Author: Omar Inuwa
When to Use
Use this skill when you need to:
- Review PRs, commits, or diffs for security vulnerabilities
- Detect security regressions (re-introduced vulnerabilities)
- Analyze the blast radius of code changes
- Check test coverage gaps for modified code
What It Does
This skill performs comprehensive security review of code changes:
- Risk-First Analysis - Prioritizes auth, crypto, value transfer, external calls
- Git History Analysis - Uses blame to understand why code existed and detect regressions
- Blast Radius Calculation - Quantifies impact by counting callers
- Test Coverage Gaps - Identifies untested changes
- Adaptive Depth - Scales analysis based on codebase size (small/medium/large)
Installation
/plugin install trailofbits/skills/plugins/differential-review
Components
| Component | Name | Purpose |
|---|---|---|
| Skill | differential-review | The review itself — Pre-Analysis plus Phases 0–6, described below |
| Command | /differential-review:diff-review | Entry point taking <pr-url|commit-sha|diff-path> [--baseline <ref>] |
| Agent | differential-review:adversarial-modeler | Phase 5 only. The skill delegates to it for HIGH RISK changes to build concrete exploit paths and rate exploitability |
Documentation Structure
This skill uses a modular documentation architecture for token efficiency and progressive disclosure:
Core Entry Point
- SKILL.md - Main entry point (224 lines)
- Quick reference tables for triage
- Decision tree routing to detailed docs
- Quality checklist and red flags
- Integration with other skills
Supporting Documentation
-
methodology.md - Detailed phase-by-phase workflow (234 lines)
- Pre-Analysis: Baseline context building
- Phase 0: Intake & Triage
- Phase 1: Changed Code Analysis
- Phase 2: Test Coverage Analysis
- Phase 3: Blast Radius Analysis
- Phase 4: Deep Context Analysis
-
adversarial.md - Attacker modeling and exploit scenarios (203 lines)
- Phase 5: Adversarial Vulnerability Analysis
- Attacker model definition (WHO/ACCESS/INTERFACE)
- Exploitability rating framework
- Complete exploit scenario templates
-
reporting.md - Report structure and formatting (369 lines)
- Phase 6: Report Generation
- 9-section report template
- Formatting guidelines and conventions
- File naming and notification templates
-
patterns.md - Common vulnerability patterns (300 lines)
- Security regressions detection
- Reentrancy, access control, overflow patterns
- Quick detection bash commands
Benefits of This Structure
- Token Efficient - Load only the documentation you need
- Progressive Disclosure - Quick reference for triage, detailed docs for deep analysis
- Maintainable - Each concern separated into its own file
- Navigable - Decision tree routes you to the right document
Workflow
The complete workflow spans Pre-Analysis + Phases 0-6:
- Pre-Analysis - Build baseline context with
audit-context-buildingskill (if available) - Phase 0: Intake - Extract changes, assess size, risk-score files
- Phase 1: Changed Code - Analyze diffs, git blame, check for regressions
- Phase 2: Test Coverage - Identify coverage gaps
- Phase 3: Blast Radius - Calculate impact of changes
- Phase 4: Deep Context - Five Whys root cause analysis
- Phase 5: Adversarial Analysis - Hunt vulnerabilities with attacker model
- Phase 6: Report - Generate comprehensive markdown report
Navigation: Use the decision tree in SKILL.md to jump directly to the phase you need.
Output
Generates a markdown report with:
- Executive summary with severity distribution
- Critical findings with attack scenarios and PoCs
- Test coverage analysis
- Blast radius analysis
- Historical context and regression risks
- Actionable recommendations
Example Usage
Review the security implications of this PR:
git diff main..feature/auth-changes
Related Skills
context-building- Used for baseline context analysisissue-writer- Transform findings into formal audit reports
相關資源

Trail of Bits Skills
Skill安全公司 Trail of Bits 出品的技能合集,40 多个插件覆盖代码审计、CodeQL/Semgrep 静态分析、差异评审、智能合约与密码学审计、模糊测试等,也可作为 Claude Code / Codex 插件市场安装。
trailofbits/skills8.6k
Sentry Skills
SkillSentry 工程团队自用的技能合集:代码评审、找 bug、安全评审、提交与 PR 撰写、迭代 PR 直到 CI 通过等。Sentry 官方维护,部分技能遵循其内部规范。
getsentry/skills1.2k
Open Code Review
Skill驱动阿里开源的 ocr CLI 评审 Git 变更(工作区、单个提交或分支对比),按严重级别汇总逐行评审意见,用户要求时自动修复。需先配置 LLM 接口(Anthropic、OpenAI 等协议),缺少 CLI 时会自动安装。阿里巴巴官方维护。
alibaba/open-code-review57.5k
Gitleaks
CLI检测 Git 仓库、目录文件与标准输入中硬编码的密码、API Key 和令牌,可配成 pre-commit 钩子或 GitHub Action 拦截密钥泄露。已宣布功能冻结、只发安全补丁,作者转向 Betterleaks。
gitleaks/gitleaks31.5k
Defending Code Reference Harness
SkillAnthropic 官方的漏洞发现与修复参考实现:在仓库内用 Claude Code 技能做威胁建模、静态扫描、分诊与补丁生成,另附侦察→发现→验证→报告→修补的自主流水线(默认针对 C/C++ 内存漏洞,需 Docker 与 gVisor 沙箱)。官方已声明不再维护。
anthropics/defending-code-reference-harness7.8k
Security Guidance
Plugin对 agent 写的代码做三层安全检查:编辑时按规则提示约 25 种危险写法,回合结束时让模型评审 diff,提交时由代理追踪跨文件漏洞(如 IDOR、SSRF)。Anthropic 官方插件,需要 Python 3.8+ 与可用的模型 API 通道。
anthropics/claude-plugins-official48.8k