Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #13963

patch-diff-research

Skill này làm gì

Skill này mô tả cách nghiên cứu một bản vá bảo mật, xây dựng kiểm thử cho thấy khác biệt, và tìm các vấn đề mã tương tự. Skill dành cho nhà nghiên cứu bảo mật và người duy trì dự án được phép kiểm tra mã.

Khi nào nên dùng

  • ✓Khi một người rà soát bảo mật yêu cầu agent so sánh phiên bản dễ bị tấn công và phiên bản đã vá của một dự án họ được phép kiểm tra.
  • ✓Khi agent cần tìm các đường mã anh em (sibling) có cùng nguyên nhân với một lỗi đã vá.
  • ✓Khi một báo cáo phải cho thấy kiểm thử dương tính trên phiên bản cũ và kiểm chứng âm tính (negative control) trên phiên bản đã vá.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể so sánh phiên bản dễ bị tấn công và phiên bản đã vá của dự án này, rồi kiểm tra xem các đường mã tương tự có còn gặp cùng vấn đề không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent cố định hai phiên bản, giải thích bản vá đã thay đổi gì, xây dựng kiểm thử thất bại trên phiên bản cũ và đạt trên phiên bản đã vá, rồi kiểm tra riêng từng vị trí tương tự.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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.

Câu hỏi thường gặp

Vì sao phải so sánh hai phiên bản?

Skill nói bản vá cho thấy vị trí của một ranh giới bảo mật, nên mã tương tự ở nơi khác có thể cần cùng một cách sửa.

Một bản vá có chứng minh mã khác dễ bị tấn công không?

Không. Skill nói bản vá là bằng chứng về một ranh giới đã thay đổi, và mỗi vị trí lân cận phải được kiểm tra trước khi báo cáo.

Báo cáo phải có gì?

Phải có chi tiết commit, kết quả kiểm thử trên cả hai phiên bản và việc xác thực từng ứng viên.

Chi tiết

Mô tả gốc của tác giả

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

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#13963
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự