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.mdCopy 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
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
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
- Pin both sides. Record repository URL, vulnerable commit, fixed commit, clean working-tree state, dependency lockfile hashes, and build commands.
- Explain the security delta. Identify the source, guard, sink, trust boundary, and behavior changed by the patch. Ignore formatting-only hunks.
- 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.
- 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.
- 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. - 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.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13963
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.