本文へスキップ
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に貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に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

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル