# Tm Security Review > Nivel exhaustivo: construye un modelo de amenazas STRIDE completo y luego ejecuta una revisión adversarial de todo el repo (HUNT -> JUDGE -> VERIFY) con PoC por hallazgo confirmado. Fuente: https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/tm-security-review Markdown: https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/tm-security-review.md Repositorio: https://github.com/Security-Phoenix-demo/security-skills-claude-code Autor: Security-Phoenix-demo Licencia: MIT Actualizado: hace 2 meses Coste de contexto: 153 tok instalada, 1.6k tok al activarse, 1.6k tok con todos los archivos del bundle Bundle: 1 archivo, 6 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent claude-code # Cursor npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent cursor # Codex npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent codex # Gemini CLI npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent gemini # Windsurf npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent windsurf # Cline npx -y skills add Security-Phoenix-demo/security-skills-claude-code --skill tm-security-review --agent cline ``` ## Qué hace - Construye o ingiere un modelo de amenazas STRIDE completo con DFD y boundaries de confianza - Ejecuta una revisión adversarial triple-pase (HUNT -> JUDGE -> VERIFY) de todo el repo guiada por ese modelo - Aplica un filtro de dirección de confianza para evitar marcar como HIGH entradas controladas por el operador - Genera un PoC ejecutable y una cadena de evidencia por cada hallazgo confirmado - Guarda el informe consolidado en ~/security-reviews/-security-review.md ## Cuándo usarla - Pides un 'threat model security review' o 'hunt for exploitable vulns with a threat model' - Trabajas con código agéntico, LLM, MCP o conectores, revisión de todo el repo o pre-merge - Necesitas un PoC ejecutable con cadena de evidencia por hallazgo, no solo un resumen de postura ## Cuándo no - Solo necesitas una pasada rápida sobre los cambios de una rama o worktree (usa tm-quick-security-assessment) ## Qué la activa - "Haz un threat model security review de este repo" - "Necesito un hunt de vulnerabilidades explotables usando un modelo de amenazas" - "/security-review de este servicio MCP con PoC por hallazgo" ## Antes de instalar - Compone las skills threat-modeling y 0day-scanner (modo deep), y usa su fallback en disco si la herramienta MCP no está disponible. ## Archivos - SKILL.md — 6 KB ## SKILL.md Reproducido tal cual desde Security-Phoenix-demo/security-skills-claude-code bajo MIT. Esta sección es el documento original y está en inglés. # TM Security Review (comprehensive tier) **Model first, hunt second.** A bare hunt enumerates source→sink flows but never asks *"is this source actually lower-trust than its sink?"* — so it over-rates operator-controlled inputs (CLI flags, config, a JAR on the classpath) as HIGH and misses the real design risk (e.g. an indirect-prompt-injection → auto-exec chain). The threat model supplies that missing trust-direction check. This skill builds the model, then runs the **sophisticated zeroday exploit hunt against it**. **This is the deep, comprehensive, whole-repo review with a threat model as input** — the heavier of the two tiers. When you only need a **quick pass over the changes on a branch/worktree**, use `tm-quick-security-assessment` instead (and optionally hand its finding surface here for the deep follow-up). **It composes two sibling skills:** - Phase 0 → **`threat-modeling`** (`../threat-modeling/SKILL.md`) — STRIDE/DREAD, DFD, trust boundaries. - Phases 1-3 → **`0day-scanner`** (`../0day-scanner/SKILL.md`) — the LLM exploit engine, run in `deep` mode, steered by the model's KEY threats. Its on-disk fallback (`security-reviewer/languages/*` + 8-point check) applies when the MCP tool is unreachable. ## When to use - "threat model security review", "hunt for exploitable vulns with a threat model", "/security-review" - Agentic / LLM / MCP / connector codebases; whole-repo or pre-merge exploit review - You need a runnable PoC + evidence chain per finding, not a posture summary ## Inputs (ask; if user is away, default + label `[ASSUMPTION]`) - **Target**: repo path / service / feature / diff + commit or branch. - **Existing threat model?** If handed one (e.g. `*-threat-model.md`), **ingest it as Phase 0 — do not regenerate.** - **Deployment/trust context** (drives severity): self-hosted library vs hosted multi-tenant service; who is the attacker vs the operator; any network-exposed surface (stdio vs HTTP)? --- ## Phase 0 — Threat model (run the `threat-modeling` skill) Produce, or ingest, a STRIDE-per-trust-boundary model. Beyond that skill's default output, require: - **DFD** with every trust-boundary crossing labelled `TBn`, and a `| ID | Boundary | Crosses | Primary risk |` table. - **Confidence label on every threat**: `[CONFIRMED]` / `[REFUTED]` / `[ASSUMPTION]` / `[QUESTION]`. - **AI surfaces mapped to OWASP Top 10 for LLM Apps 2025** (LLM01 prompt injection, LLM02 sensitive-info disclosure, LLM05 improper output handling, LLM06 excessive agency, LLM08, LLM10). These design risks are the ones no pattern scanner can test. - **Severity calibrated to the deployment context** from Inputs. - Surface the `[QUESTION]`/`[ASSUMPTION]` items that change severity and **ask the user**; if away, take the conservative default and mark it. ### The trust-direction gate (do NOT skip — this is the whole point) Before any threat keeps a HIGH: **is the source genuinely lower-trust than the sink it reaches?** - Operator-supplied CLI flags / config / env / a JAR on the classpath = the operator acting on their own system → **not attacker-controlled**. "RCE" that needs you to already run code crosses no boundary. Demote or refute, with the reason recorded. - A source is only dangerous if a *lower-trust* party controls it (external HTTP content, ingested third-party metadata, an anonymous request, another tenant). - Refutations are findings too — they stop bad HIGHs shipping and preserve reviewer credibility. --- ## Phase 1 — HUNT (attack-surface map, model-driven) Take the KEY / High threats that passed the gate. Drive `0day-scanner` (deep mode) plus your own code reading / grep / graph tracing at each one. Enumerate the concrete **source → sink** path per threat. Narrate reasoning as you go. ## Phase 2 — JUDGE (classify) One table, exactly these columns: `| ID | Vulnerability | File | Line(s) | Severity | Sink |` IDs `V-01…`; severity `CRITICAL / HIGH / MEDIUM / LOW`. **Apply the trust-direction gate to every row** — a flow whose source ≥ sink trust is demoted/refuted with a reason, never listed HIGH. ## Phase 3 — VERIFY (prove it) For each confirmed exploit: - **Root cause** — why the sink is reachable with genuinely attacker-controlled input. - **Evidence chain** — the source→sink path, every step cited `[[path:line]]`. - **PoC** — a concrete, runnable proof (curl / payload / unit snippet) in a fenced block. - **Compensating-control residual** — residual risk *after* the suggested control. ## Consolidated report - Findings `V-01…V-N`: severity label, `[[path:line]]` citations, residual rating, PoC. - **Confirmed-against-model score** (e.g. "12/15 model claims confirmed in code") **with the caveat**: it is an *agreement* score, not an independent check — grading against the model doesn't prove the model's severities are right. - Cross-cutting positives (`[CONFIRMED]`): parameterized queries, safe deserialisation, correct secret handling — call them out. - Prioritised remediation: `| Action | Owner/ETA | Trade-off |`. Lead with the real critical (usually the design chain), not the demoted CLI bugs. - Plain-text headers + markdown tables; no emojis, no Mermaid in the review body. ## Deliverable Save to `~/security-reviews/-security-review.md` (models & reviews live outside the reviewed repo; never modify source). State the path. If no Semgrep/OpenGrep pass was run, recommend it as a **pattern-level backstop** for classic injection/secret/subprocess bugs — not for the LLM-architecture design risks. ## Dónde encaja - Categoría: [Seguridad](https://skillsagentes.com/categorias/seguridad.md) — Auditorías, revisión de dependencias, manejo de secretos y modelado de amenazas. - Creador: [Security-Phoenix-demo](https://skillsagentes.com/creators/security-phoenix-demo.md) — 27 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [Cti Domain Research](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/cti-domain-research.md): Busca inteligencia de amenazas, CVEs, análisis de malware e informes de brechas en más de 300 dominios de seguridad curados, con ingesta opcional a NotebookLM. - [Notebooklm](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/notebooklm.md): Consulta tus notebooks de Google NotebookLM desde Claude Code y obtén respuestas de Gemini basadas en tus fuentes, con citas y alucinaciones drásticamente reducidas. - [Prd Generator](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/prd-generator.md): Genera un PRD completo con enfoque de seguridad a partir de una descripción en lenguaje llano: documento estructurado, página en Confluence, plan para .cursor/plans/ y markdown descargable. - [Phoenix Research Pipeline](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/phoenix-research-pipeline.md): Pipeline automatizado que busca en YouTube, web (Brave/Scrapling) y Reddit sobre un tema de seguridad y envía los resultados a NotebookLM con prompts de marca Phoenix (blog, diapositivas, vídeo). - [Project Documenter](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/project-documenter.md): Genera documentación de nivel profesional para cualquier proyecto de software, con cinco modos: Express, General, IA/LLM, Arquitectura y Full, produciendo siempre DOC_INDEX.md y CLAUDE.md. ## Skills relacionadas - [Cti Domain Research](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/cti-domain-research.md): Busca inteligencia de amenazas, CVEs, análisis de malware e informes de brechas en más de 300 dominios de seguridad curados, con ingesta opcional a NotebookLM. - [Phoenix Ambiguity Hunter](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/phoenix-ambiguity-hunter.md): Rol 05 del pipeline de especificación Phoenix Security: detecta fallos de aislamiento multi-tenant, agujeros de seguridad en agentes IA, controles de auth ausentes y deriva en RFC 2119. - [Phoenix Constraint Distiller](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/phoenix-constraint-distiller.md): Rol 03 del pipeline de specs de Phoenix Security: destila el SCOPE_DEFINITION en un ACTIVE_SET de 8–15 restricciones compactas y testeables basadas en las PSC-01 a PSC-12. - [Phoenix Final Gate](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/phoenix-final-gate.md): Role 10 del pipeline Phoenix Security: toma la decisión final SHIP/NO_SHIP de un feature spec revisando 8 bloqueadores duros (ambigüedades, MUSTs, PSC-03, PSC-06, PSC-08, scope creep, P0, cuentas enterprise). - [Phoenix Orchestrator](https://skillsagentes.com/skills/security-phoenix-demo/security-skills-claude-code/phoenix-orchestrator.md): Ejecuta el pipeline completo de especificación de Phoenix Security (roles 01–10), desde contexto bruto hasta un PRD listo para lanzar, encadenando todos los roles automáticamente. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)