Saltar al contenido
Skillpedia
Seguridad6,5 mil · #13900

patcher-overview

Qué hace

Guía a un agente que repara problemas de seguridad confirmados con cambios de código mínimos y vuelve a ejecutar una comprobación. Es para desarrolladores de la canalización de seguridad Decepticon.

Cuándo usarla

  • ✓Cuando un escáner de seguridad ha confirmado un fallo y necesita una corrección pequeña y concreta.
  • ✓Cuando quieres que una corrección propuesta se pruebe de nuevo antes de marcarla como terminada.
  • ✓Cuando una corrección causó una regresión y necesita revertirse e intentarse de nuevo.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/plugins/patcher/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Confirmamos una inyección SQL en nuestra página de búsqueda. ¿Puedes escribir la corrección más pequeña y comprobar que funciona?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente lee el código alrededor de cada fallo, propone un cambio mínimo que usa un método seguro, lo aplica y vuelve a ejecutar la prueba de concepto y las pruebas antes de aceptarlo.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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.

Preguntas frecuentes

¿Reescribe archivos enteros?

No. Trabaja un asunto cada vez, con cambios mínimos y sin limpiezas no relacionadas.

¿Cuál es la corrección preferida para la inyección SQL?

Usar una consulta parametrizada o un filtro de ORM en lugar de escapar la entrada a mano.

¿Qué pasa si una prueba falla?

El agente revierte el cambio, analiza el resultado y reintenta, hasta tres intentos.

Detalles

Descripción original del autor

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

repo: BitterSecurity/Decepticon

Popularidad

Estrellas en GitHub
6,5 mil
Posición en el ranking
#13900
Licencia
Apache-2.0
Actualizada
1/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas