본문으로 건너뛰기
Skillpedia
보안6.5k · #13900

patcher-overview

하는 일

이 스킬은 확인된 보안 문제를 최소한의 코드 변경으로 고친 뒤 점검을 다시 실행하는 에이전트를 안내합니다. Decepticon 보안 파이프라인의 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓보안 스캐너가 버그를 확인해서 작고 집중된 수정이 필요할 때.
  • ✓완료로 표시하기 전에 제안된 수정을 다시 테스트하고 싶을 때.
  • ✓수정이 회귀를 일으켜서 되돌리고 다시 시도해야 할 때.

스킬 링크

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/plugins/patcher/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/plugins/patcher/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 검색 페이지에서 SQL 인젝션을 확인했어요. 가장 작은 수정안을 작성하고 그것이 작동하는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 각 버그 주변 코드를 읽고, 안전한 방법을 쓰는 최소한의 변경을 제안하고, 적용한 뒤, 승인하기 전에 개념 증명과 테스트를 다시 실행합니다.

기술 내용 (원본 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-color output 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 인젝션에 선호되는 수정은 무엇인가요?

입력을 손으로 이스케이프하는 대신 매개변수화된 쿼리나 ORM 필터를 쓰는 것입니다.

테스트가 실패하면 어떻게 되나요?

에이전트는 변경을 되돌리고 결과를 분석한 뒤, 최대 세 번까지 다시 시도합니다.

상세 정보

작성자의 원본 설명

Stage 4 patch generation playbook. Minimal diffs for validated findings with mandatory patch_verify. Load at patcher-agent startup.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#13900
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬