Langsung ke konten
Skillpedia
Keamanan8.0k Β· #12674

differential-review

Fungsinya

Melakukan tinjauan berfokus keamanan pada perubahan kode, dengan memeriksa area berisiko seperti autentikasi, kripto, dan transfer nilai. Skill ini untuk developer dan peninjau keamanan yang memeriksa perubahan sebelum digabung.

Kapan dipakai

  • βœ“Saat peninjau membutuhkan pemeriksaan keamanan pada pull request, commit, atau diff.
  • βœ“Saat tim ingin tahu apakah perubahan memunculkan kembali bug yang pernah diperbaiki.
  • βœ“Saat peninjau ingin tahu apa lagi yang bisa terdampak oleh perubahan.

Link skill

https://github.com/trailofbits/skills/blob/main/plugins/differential-review/skills/differential-review/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/trailofbits/skills/blob/main/plugins/differential-review/skills/differential-review/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTinjau pull request ini untuk masalah keamanan dan beri tahu saya apa lagi yang bisa rusak karenanya.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill ini menyesuaikan kedalaman tinjauan dengan ukuran basis kode, memeriksa riwayat git untuk konteks, menghitung pemanggil untuk memperkirakan dampak, dan memeriksa apakah kode yang berubah memiliki tes. Hasilnya berupa laporan markdown yang menyatakan batasannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Differential Security Review

Security-focused code review for PRs, commits, and diffs.

Core Principles

  1. Risk-First: Focus on auth, crypto, value transfer, external calls
  2. Evidence-Based: Every finding backed by git history, line numbers, attack scenarios
  3. Adaptive: Scale to codebase size (SMALL/MEDIUM/LARGE)
  4. Honest: Explicitly state coverage limits and confidence level
  5. Output-Driven: Always generate comprehensive markdown report file

Rationalizations (Do Not Skip)

Rationalization Why It's Wrong Required Action
"Small PR, quick review" Heartbleed was 2 lines Classify by RISK, not size
"I know this codebase" Familiarity breeds blind spots Build explicit baseline context
"Git history takes too long" History reveals regressions Never skip Phase 1
"Blast radius is obvious" You'll miss transitive callers Calculate quantitatively
"No tests = not my problem" Missing tests = elevated risk rating Flag in report, elevate severity
"Just a refactor, no security impact" Refactors break invariants Analyze as HIGH until proven LOW
"I'll explain verbally" No artifact = findings lost Always write report

Quick Reference

Codebase Size Strategy

Codebase Size Strategy Approach
SMALL (<20 files) DEEP Read all deps, full git blame
MEDIUM (20-200) FOCUSED 1-hop deps, priority files
LARGE (200+) SURGICAL Critical paths only

Risk Level Triggers

Risk Level Triggers
HIGH Auth, crypto, external calls, value transfer, validation removal
MEDIUM Business logic, state changes, new public APIs
LOW Comments, tests, UI, logging

Workflow Overview

Pre-Analysis β†’ Phase 0: Triage β†’ Phase 1: Code Analysis β†’ Phase 2: Test Coverage
    ↓              ↓                    ↓                        ↓
Phase 3: Blast Radius β†’ Phase 4: Deep Context β†’ Phase 5: Adversarial β†’ Phase 6: Report

Decision Tree

Starting a review?

β”œβ”€ Need detailed phase-by-phase methodology?
β”‚  └─ Read: methodology.md
β”‚     (Pre-Analysis + Phases 0-4: triage, code analysis, test coverage, blast radius)
β”‚
β”œβ”€ Analyzing HIGH RISK change?
β”‚  β”œβ”€ Read: adversarial.md
β”‚  β”‚  (Phase 5: Attacker modeling, exploit scenarios, exploitability rating)
β”‚  └─ Or delegate to: differential-review:adversarial-modeler agent
β”‚     (Autonomous attacker modeling with concrete exploit scenarios)
β”‚
β”œβ”€ Writing the final report?
β”‚  └─ Read: reporting.md
β”‚     (Phase 6: Report structure, templates, formatting guidelines)
β”‚
β”œβ”€ Looking for specific vulnerability patterns?
β”‚  └─ Read: patterns.md
β”‚     (Regressions, reentrancy, access control, overflow, etc.)
β”‚
└─ Quick triage only?
   └─ Use Quick Reference above, skip detailed docs

Agents

differential-review:adversarial-modeler β€” Models attacker perspectives and builds exploit scenarios for HIGH RISK code changes. Follows the 5-step adversarial methodology (attacker model, attack vectors, exploitability rating, exploit scenario, baseline cross-reference) and produces structured vulnerability reports. Delegate to this agent when Phase 5 analysis is needed on high-risk changes, passing that full namespaced name as subagent_type β€” a bare adversarial-modeler is unregistered and the dispatch fails at runtime.


Quality Checklist

Before delivering:

  • All changed files analyzed
  • Git blame on removed security code
  • Blast radius calculated for HIGH risk
  • Attack scenarios are concrete (not generic)
  • Findings reference specific line numbers + commits
  • Report file generated
  • User notified with summary

Integration

audit-context-building skill:

  • Pre-Analysis: Build baseline context
  • Phase 4: Deep context on HIGH RISK changes

issue-writer skill:

  • Transform findings into formal audit reports
  • Command: issue-writer --input DIFFERENTIAL_REVIEW_REPORT.md --format audit-report

Example Usage

Quick Triage (Small PR)

Input: 5 file PR, 2 HIGH RISK files
Strategy: Use Quick Reference
1. Classify risk level per file (2 HIGH, 3 LOW)
2. Focus on 2 HIGH files only
3. Git blame removed code
4. Generate minimal report
Time: ~30 minutes

Standard Review (Medium Codebase)

Input: 80 files, 12 HIGH RISK changes
Strategy: FOCUSED (see methodolog
Pertanyaan umum

Apakah perubahan kecil boleh dilewati?

Tidak. Skill ini menilai perubahan berdasarkan risiko, bukan ukuran, karena perubahan kecil pun bisa menyebabkan bug serius.

Apa itu blast radius?

Artinya seberapa banyak bagian kode lain yang bergantung pada kode yang berubah, dan skill ini menghitungnya.

Apakah skill ini menulis laporan?

Ya. Skill ini selalu menghasilkan file laporan markdown.

Detail

Deskripsi asli dari pembuat

Performs security-focused differential review of code changes. Adapts analysis depth to codebase size, uses git blame for context, calculates blast radius by counting callers, checks test coverage of modified code, and generates a markdown report. Use when reviewing a PR, commit, or diff for security vulnerabilities, checking whether a change re-introduces a previously fixed bug, asking what else a change could break, or finding which modified code has no test covering it.

repo: trailofbits/skills

Popularitas

Bintang GitHub
8.0k
Peringkat
#12674
Lisensi
CC-BY-SA-4.0
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa