post-patch-validation
यह क्या करती है
मूल और पैच किए कोड पर दोहराए जा सकने वाले टेस्ट से सुरक्षा पैच की जाँच करती है, जिसमें रिपोर्ट किया गया शोषण, मिलते-जुलते रूप, रिग्रेशन और नए जोखिम शामिल हैं। यह उन रिव्यूअर्स और टीमों के लिए है जो तय कर रहे हैं कि सुधार स्वीकार करना सुरक्षित है या नहीं।
कब इस्तेमाल करें
- ✓जब कोई सुरक्षा पैच, सुधार कमिट या पुल रिक्वेस्ट रिव्यू के लिए तैयार हो।
- ✓जब मानव रिव्यू या मर्ज से पहले AI से बने पैच की पुष्टि चाहिए।
- ✓जब पैच एक शोषण मार्ग ठीक करे पर उसी कारण के दूसरे रूप छूट जाएँ।
Skill का लिंक
https://github.com/trailofbits/skills/blob/main/plugins/post-patch-validation/skills/post-patch-validation/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस सुरक्षा पैच को मूल शोषण के खिलाफ़ परखिए और देखिए कि कौन-से संबंधित रूप छूट सकते हैं।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह स्किल कमज़ोर आधार और पैच किए गए संस्करण को पिन करती है, मूल प्रूफ़ और संबंधित रूप चलाती है, और जाँचती है कि जो व्यवहार बनाए रखना है वह अब भी काम करता है। यह बताती है कि क्या विफल हुआ और क्या अभी परखा नहीं गया।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Post-Patch Validation
Validate a security patch against the reported bug and the surrounding code it affects. Give the patch author reproducible failures to fix and identify what still needs testing. Apply the same checks to human and agent patches. The diff, author, upstream implementation, and original proof of concept alone cannot establish correctness.
When to Use
- A security fix, remediation commit, patch file, or pull request already exists.
- An AI-generated patch needs validation before human review or merge.
- A fix may cover one exploit path while missing variants of the same root cause.
- A security fix may alter legitimate behavior or introduce a new vulnerability.
- A patch author needs concrete failures and coverage gaps before another revision.
When NOT to Use
- No patch exists yet; use vulnerability discovery or fix implementation first.
- The task is to review an audit finding against a report without executing patch evidence.
- The task is only to convert a finding into a permanent project test.
- The target is remote or production. This skill executes local code and tests only.
- The user has not authorized execution of the repository's code or test suite.
Quick Start
Pin the vulnerable base and patched input. Prefer immutable commits. For uncommitted work, create a binary patch file first; do not validate in the user's working tree.
Scaffold a pinned plan:
uv run {baseDir}/scripts/post_patch_validation.py scaffold \ --repo . \ --base-ref <vulnerable-ref> \ --patched-ref <patched-ref> \ --finding-id <stable-id> \ --finding-summary "<root cause and impact>" \ --evidence-level runtime \ --output post-patch-validation/plan.jsonUse
--patch-file <path>instead of--patched-reffor a patch artifact. Choose the highest honest evidence level:sourcefor source/patch invariants only,buildwhen target code is compiled or analyzed but the reported behavior is not executed, orruntimewhen the checks execute the reported behavior and its safety assertions.Inspect the finding, diff, callers, sibling paths, cleanup/error paths, and existing tests. Populate
checksin the generated plan. Runprint-schemafor the structural schema:uv run {baseDir}/scripts/post_patch_validation.py print-schemaRun
validate-planfor the complete validation, including coverage, command restrictions, and pinned inputs, before executing code:uv run {baseDir}/scripts/post_patch_validation.py validate-plan \ --plan post-patch-validation/plan.jsonExecute the evidence plan:
uv run {baseDir}/scripts/post_patch_validation.py run \ --plan post-patch-validation/plan.json \ --output post-patch-validation/resultsReport
result.json,report.md, the evidence level, and the completeassessment. Return each finding to the patch author with its check ID, assertion, and saved logs. Identify each validation gap separately, including gaps that coexist with supported findings. After the author revises the patch, pin the new inputs and save a fresh validation run. Preserve the prior evidence. Passing supplied checks still requires human review before acceptance.
Evidence Contract
The runner rejects incomplete plans. Supply at least one check of every kind:
| Kind | Required observation |
|---|---|
control |
Benign harness succeeds on both base and patch |
exploit |
Original safety assertion fails on base and succeeds on patch |
variant |
A distinct root-cause variant fails on base and succeeds on patch |
behavior |
Unaffected behavior succeeds with byte-identical selected output |
regression |
Targeted non-security regression check succeeds on both revisions |
security |
Adjacent/new-vulnerability check succeeds on base and patch |
suite |
Existing project suite, sanitizer, or deterministic fuzz campaign succeeds on patch |
Commands are argv arrays, never shell strings. Put complex setup in a checked-in or plan artifact
script and invoke it with {plan_dir}. The runner fixes locale/timezone/hash-seed inputs, executes
checks in lexical ID order, records raw stdout/stderr, and never edits the original worktree.
Each check's timeout_seconds defaults to 300 and accepts integers from 1 through 3600.
Exceeding the timeout leaves a validation gap. A timeout alone does not establish a regres
अक्सर पूछे जाने वाले सवाल
क्या यह रिमोट या प्रोडक्शन सिस्टम पर काम करती है?
नहीं। यह सिर्फ़ स्थानीय कोड और टेस्ट चलाती है, और तभी जब आप इसकी अनुमति दें।
क्या साफ़ diff पैच पर भरोसे के लिए काफ़ी है?
नहीं। स्किल कहती है कि अकेला diff, उसका लेखक या मूल प्रूफ़ सही होने का प्रमाण नहीं दे सकता।
क्या यह पैच लिखने वाले की मदद करती है?
हाँ। यह अगले संशोधन के लिए ठोस विफलताएँ और कवरेज की कमियाँ देती है।
जानकारी
लेखक का मूल विवरण
Validates security patches with reproducible baseline-versus-patched evidence, including original exploits, root-cause variants, behavior preservation, regressions, and newly introduced security failures. Use after a patch exists and before accepting, merging, or reporting it as fixed; also use when an AI-generated patch, remediation commit, pull request, or proposed upstream fix needs adversarial post-patch validation across any language.
repo: trailofbits/skills
लोकप्रियता
- GitHub स्टार
- 8.0k
- रैंकिंग में स्थान
- #12693
- लाइसेंस
- CC-BY-SA-4.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
audit-context-building
8.0kयह आपके एजेंट को सुरक्षा जाँच से पहले किसी अनजान कोड को समझने में मदद करती है, हर फ़ंक्शन की मान्यताएँ और निर्भरताएँ नक्शे में दिखाकर।
algorand-vulnerability-scanner
8.0kयह आपके एजेंट को Algorand कॉन्ट्रैक्ट्स में 11 आम सुरक्षा समस्याएँ जाँचने में मदद करती है, जैसे रीकीइंग हमले और बिना जाँची फ़ीस।
audit-prep-assistant
8.0kयह आपके एजेंट को बाहरी सुरक्षा समीक्षा के लिए कोड तैयार करने में मदद करती है, जैसे स्टैटिक एनालिसिस, टेस्ट कवरेज और दस्तावेज़ीकरण।
cairo-vulnerability-scanner
8.0kयह आपके एजेंट को StarkNet के Cairo कॉन्ट्रैक्ट्स में 6 गंभीर समस्याएँ जाँचने में मदद करती है, जैसे ओवरफ़्लो और सिग्नेचर रीप्ले।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।