Skip to content
Skillpedia
Security6.5k · #13963

patch-diff-research

What it does

This skill describes how to study a security patch, build a test that shows the difference, and look for similar code problems. It is for security researchers and maintainers who are authorized to inspect the code.

When to use it

  • ✓When a security reviewer asks the agent to compare a vulnerable and fixed version of a project they are authorized to inspect.
  • ✓When the agent needs to find sibling code paths with the same cause as a patched bug.
  • ✓When a report must show a positive test on the old version and a negative control on the fixed version.

Skill link

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you compare the vulnerable and fixed versions of this project and check whether similar code paths still have the same problem?”

5 new skills a week. 1 minute to read.

How it works

The agent pins both versions, explains what the patch changed, builds a test that fails on the old version and passes on the fixed one, and then checks each similar spot separately.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Patch-Diff Research

Use this workflow only on source, commits, and test targets the engagement is authorized to inspect. A patch is evidence of a changed security boundary, not proof that every neighboring line is exploitable.

Inputs

  • Pinned vulnerable and fixed revisions from the same repository.
  • Build instructions and a local or intentionally vulnerable test target.
  • The advisory, failing test, or exact behavior corrected by the patch.

Loop

  1. Pin both sides. Record repository URL, vulnerable commit, fixed commit, clean working-tree state, dependency lockfile hashes, and build commands.
  2. Explain the security delta. Identify the source, guard, sink, trust boundary, and behavior changed by the patch. Ignore formatting-only hunks.
  3. Build a differential test. The positive case must reproduce on the vulnerable revision; the negative control is the exact same case on the fixed revision. Record both raw outputs.
  4. Search for siblings. Search only for the abstract cause—not the exact line text. For every hit, confirm framework, data flow, authorization state, and reachability before treating it as a candidate.
  5. Validate candidates independently. Each candidate gets its own minimal positive and baseline command through validate_workspace_finding. Do not inherit validation from the original CVE.
  6. Report the boundary. Record rejected siblings and why they differ. Group only independently confirmed findings under the common root cause.

Required artifacts

research/patch-diff/<advisory>/
  revisions.json                 # commits and dependency hashes
  security-delta.md              # source / guard / sink explanation
  original-positive.txt          # vulnerable revision output
  original-fixed-control.txt     # fixed revision output
  variants/<candidate>/positive.txt
  variants/<candidate>/baseline.txt
  variants/<candidate>/verification.json

A variant is promotable only when its own verification artifact validates and the original fixed-side control demonstrates the intended remediation boundary.

FAQ

Why compare two versions?

The skill says a patch shows where a security boundary was, so similar code elsewhere may need the same fix.

Does a patch prove other code is vulnerable?

No. The skill says a patch is evidence of a changed boundary, and each neighbor must be checked before it is reported.

What must the report include?

It must include the commit details, the test results on both versions and the validation of each candidate.

Details

Original description by the author

Authorized patch-diff workflow for deriving and validating vulnerability variants from a known vulnerable-to-fixed source change.

repo: BitterSecurity/Decepticon

Popularity

GitHub stars
6.5k
Ranking position
#13963
License
Apache-2.0
Updated
11/1/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills