Skip to content
SkillModel-led1,631 tokens in use

Differential Security Review

Reviews PRs, commits and diffs for security risk using git history, blast radius by caller count and test coverage checks, and writes a markdown report.

8,319 stars on the repository CC-BY-SA-4.0trailofbits/skills · plugins/differential-review/skills/differential-review
/plugin marketplace add trailofbits/skills
View source

Install command as written in the repository's README

Skill label

measured from its files

What installing Differential Security Review costs

96tokens idle
1,631tokens in use
8,050tokens, up to

Idle is what sits in context while the skill is installed. In use is its instructions, loaded when it runs. Up to adds the files its instructions link. Counts are approximate, made offline with cl100k_base.

Model dependence Model-led

Script-ledMixedModel-led

Mostly instructions, so how well it works depends on the model that follows them.

This describes the skill's structure, how much of it is scripts. It does not say how well it works.

Touches

shelldeclaredwrites filesdeclared

Declared tags come from the skill's frontmatter; detected ones from its scripts, its code blocks and the commands it names in inline code. This is detected, not audited.

How it scores

Quality

How well the skill is written, counted from its own files: its frontmatter, its steps, examples, stated output and constraints, its size and whether every file it ships is one it names.How we score it →
Excellent
  • Frontmatter12/15
  • Structure23/25
  • Examples15/15
  • Output10/15
  • Size15/15
  • Resources12/15

Security

Starts at 100 and loses points for each thing in the skill's files that a reader should look at first.How we score it →
Excellent

No findings.

Repository health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
Good
  • Development activity100
  • Maintenance52
  • Community64
  • Maturity32
  • Momentum40

Differential Security Review is a Trail of Bits skill for reviewing a code change on its own, with its history. It classifies each changed file by risk (auth, crypto, external calls and value transfer rank high), scales its depth to codebase size, uses git blame on removed security code to catch reintroduced bugs, counts callers to estimate blast radius, and checks whether modified code has any test.

Every review ends with a markdown report file. Detailed methodology, attacker modeling, reporting templates and a vulnerability pattern list sit in companion files, and an adversarial-modeler agent can build exploit scenarios for high-risk changes.

What You Get

  • A markdown report file with findings tied to line numbers, commits and concrete attack scenarios
  • A risk level per changed file, from high to low, with stated triggers
  • Blast radius numbers based on counted callers
  • Flags for modified code that no test covers, with severity raised accordingly

Common Use Cases

  • Reviewing a pull request that touches authentication or crypto
  • Checking whether a change removes code added by an earlier security fix
  • Asking what else a change could break across its callers
  • Finding which modified lines have no covering test

What Makes It Unique

It reviews the diff in the context of history. It requires git blame on removed security code, treats refactors as high risk until shown otherwise, and refuses to judge risk by pull request size, since a two-line change can matter. It also requires stating coverage limits and confidence, and writing the report to a file.

Under The Hood

The skill loads one instruction file and, as needed, four companion documents and an agent definition. The agent uses Read, Write, Grep, Glob and Bash on your repository: git commands for diffs, history and blame, searches to count callers, and a write of the report file. It does not fetch web pages or call outside APIs by itself. Delegating to the adversarial-modeler agent starts a sub-agent that reads the same code.

Join founders building with open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on SubstackJoin 750+ subscribers