Skillpedia
الأمان6.5k · #13963

patch-diff-research

ما الذي تفعله

تصف هذه المهارة كيفية دراسة تصحيح أمني، وبناء اختبار يُظهر الفرق، والبحث عن مشكلات مماثلة في الكود. وهي مخصصة لباحثي الأمن والمشرفين المصرّح لهم بفحص الكود.

متى تستخدمها

  • ✓عندما يطلب مراجع أمني من وكيله مقارنة نسخة معرّضة ونسخة مُصلحة من مشروع مصرّح له بفحصه.
  • ✓عندما يحتاج وكيلك إلى إيجاد مسارات كود شقيقة لها السبب نفسه لخلل تم تصحيحه.
  • ✓عندما يجب أن يُظهر تقرير اختبارًا إيجابيًا على النسخة القديمة وضابطًا سلبيًا على النسخة المُصلحة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/patch-diff/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“هل تستطيع مقارنة النسختين المعرّضة والمُصلحة من هذا المشروع، وفحص ما إذا كانت مسارات الكود المشابهة ما زالت تحمل المشكلة نفسها؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يثبّت وكيلك النسختين، ويشرح ما الذي غيّره التصحيح، ويبني اختبارًا يفشل على النسخة القديمة وينجح على المُصلحة، ثم يفحص كل موضع مشابه على حدة.

المحتوى التقني (ملف 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
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة