patcher-overview
यह क्या करती है
यह स्किल एक ऐसे एजेंट का मार्गदर्शन करती है जो न्यूनतम कोड बदलावों से पक्की सुरक्षा समस्याएँ ठीक करता है और फिर जाँच दोबारा चलाता है। यह Decepticon सुरक्षा पाइपलाइन के डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब सुरक्षा स्कैनर ने कोई बग पक्का किया हो और उसे छोटे, केंद्रित सुधार की ज़रूरत हो।
- ✓जब आप चाहें कि प्रस्तावित सुधार को पूरा मानने से पहले दोबारा परखा जाए।
- ✓जब कोई सुधार रिग्रेशन पैदा करे और उसे वापस लेकर दोबारा कोशिश करनी हो।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/plugins/patcher/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“हमारे खोज पेज में SQL injection पक्की हो गई है। क्या आप सबसे छोटा सुधार लिख सकते हैं और जाँच सकते हैं कि वह काम करता है?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट हर बग के आसपास का कोड पढ़ता है, एक न्यूनतम बदलाव प्रस्तावित करता है जो सुरक्षित तरीका इस्तेमाल करता है, उसे लागू करता है, और स्वीकार करने से पहले proof of concept और टेस्ट दोबारा चलाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Patcher Skill
You fix validated findings and prove the fix holds. Minimal diffs, one
concern at a time, mandatory patch_verify before claiming done.
Iteration loop
while not patched and attempts < 3:
1. kg_query(kind="vulnerability", min_severity="medium")
→ pick validated=True, patched!=True
2. Read the function around (file, line)
3. Design minimal fix (validate / escape / parameterize / safe API)
4. patch_propose(vuln_id, diff, commit_message) → patch_id
5. Apply diff via Edit or bash patch
6. (optional) bash: run repo tests, abort on failure
7. patch_verify(patch_id, poc_command, success_patterns,
test_cmd=optional)
8. if status == "verified": done
elif status == "tests_failed": revert, retry
elif status == "regressed": revert, analyze, retry
attempts += 1
Diff style
- Unified diff. Use
git diff --no-coloroutput or write one by hand. - Minimal hunk. One concern. No formatting. No renames. No "while I'm here" cleanups. No new files (unless adding one regression test).
- Safe-API preference.
| Bug class | Preferred fix |
|---|---|
| SQL injection | Parameterized query / ORM.filter(), NOT escaping |
| Command injection | Arg-list subprocess, shell=False |
| Path traversal | os.path.realpath + prefix check |
| SSRF | Allowlist + resolve → check not private/loopback |
| Deserialization | Switch to safe loader (yaml.safe_load, JSON, etc.) |
| Broken auth | Move check to pre-hook, not inside handler |
| Reflected XSS | Framework auto-escape, remove Markup/safe |
- Add a regression test in the same diff when the repo has a test directory for the affected module. One test that exercises the fixed path is sufficient.
Commit message format
Conventional commits. Example:
fix(auth): use constant-time comparison in verify_hmac
Prevents timing side-channel recovery of the HMAC. CWE-208.
Decisive-completion rule
Only report "patched" after patch_verify.status == "verified". A
green test suite is NOT sufficient — the PoC must actually fail.
If all 3 attempts fail, STOP on the finding, record a note via
kg_add_node on the vuln (patch_attempts=3, last_failure=...) and
return to the orchestrator. Do not spiral.
अक्सर पूछे जाने वाले सवाल
क्या यह पूरी फ़ाइलें दोबारा लिखती है?
नहीं। यह एक बार में एक चिंता पर काम करती है, न्यूनतम बदलाव के साथ और असंबंधित सफ़ाई के बिना।
SQL injection के लिए पसंदीदा सुधार क्या है?
इनपुट को हाथ से escape करने की बजाय parameterized query या ORM फ़िल्टर इस्तेमाल करें।
अगर टेस्ट फ़ेल हो तो?
एजेंट बदलाव वापस लेता है, नतीजे का विश्लेषण करता है और तीन प्रयासों तक दोबारा कोशिश करता है।
जानकारी
लेखक का मूल विवरण
Stage 4 patch generation playbook. Minimal diffs for validated findings with mandatory patch_verify. Load at patcher-agent startup.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #13900
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।