跳到正文
Skillpedia
安全6.5k · #13963

patch-diff-research

它能做什么

这项技能说明如何研究安全补丁、构建一个能体现差异的测试,并查找类似的代码问题。适合获得授权检查代码的安全研究人员和维护者。

适用场景

  • ✓当安全审查人员要求智能体比较其有权检查的项目的漏洞版本与修复版本时。
  • ✓当智能体需要找出与已修补漏洞具有相同成因的相邻代码路径时。
  • ✓当报告需要展示旧版本上的正向测试和修复版本上的反向对照时。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我比较这个项目的漏洞版本与修复版本,并检查类似的代码路径是否仍存在同样的问题?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体锁定两个版本,说明补丁改动了什么,构建一个在旧版本上失败、在修复版本上通过的测试,然后逐一检查每个类似位置。

技术内容(原始 SKILL.md)

作者在 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.

常见问题

为什么要比较两个版本?

该技能指出,补丁标明了安全边界所在的位置,因此其他地方的类似代码可能需要同样的修复。

补丁能证明其他代码存在漏洞吗?

不能。该技能指出,补丁只是边界被改动的证据,每个相邻位置在报告之前都必须逐一检查。

报告必须包含哪些内容?

必须包含提交信息、两个版本上的测试结果,以及对每个候选问题的验证。

详情

作者的原始描述

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

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#13963
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能