Logotipo de Vulnhunt

Vulnhunt

OrganizaciónPopular
capitalone
vulnhunt

Scan a codebase for exploitable security defects. Enumerates every user-controllable input, traces each forward to dangerous sinks, proves exploitability with executable tests, and proposes validated fixes.

Descripción general

Editorcapitalone
RepositorioVulnHunter
Nombre de la habilidadvulnhunt
Estrellas
1.1K
Forks
161
Archivos incluidos
11
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 11

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por capitalone en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Vulnhunt en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/capitalone/VulnHunter/tree/main/vulnhunt
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/capitalone/VulnHunter.git /tmp/VulnHunter
mkdir -p .claude/skills
cp -r /tmp/VulnHunter/vulnhunt .claude/skills/vulnhunt
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Vulnhunt en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Vulnhunt automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Vulnhunt no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

VulnHunter Security Audit Skill

MANDATORY FIRST ACTIONS

Step 0: Model check (interactive/direct invocation only). When invoked interactively — i.e. path B below, with no "Pre-resolved scan metadata" block — inspect the model you are running as. If it is NOT Opus 4.7 or higher, STOP immediately and tell the user (do not run any tools, resolve the target, or offer the mode menu yet):

⚠️ VulnHunter is optimized for Claude Opus 4.7/4.8 and may be unreliable on other models. Please switch with the /model opus command, then re-run /vulnhunt.

Wait for the user. Only proceed past this step once they are on Opus, or if they explicitly reply that they want to continue on the current model anyway.

Skip this check under path A (agent-driven); the agent controls the model.

Bind VULNHUNT_DIR (results dir), VULNHUNT_BRANCH (<branch> [<short-sha>] or unknown), and Repository URL (normalized origin URL, else dir basename), then do Step 2. Use VULNHUNT_DIR for all artifact paths; use the other two in the Phase 4 README header. Get these one of two ways:

A — Agent-driven: the kickoff prompt has a "Pre-resolved scan metadata" block. Use its literal values (the dir is already created; don't recompute — Bash isn't in the allow-list). Its Bash line drives Step 2: "NOT available" → read-only; "AVAILABLE" → install.

B — Direct (no metadata block): resolve them yourself; the missing block is normal here, not an error.

  • Target: the current directory, unless the invocation names a path. Confirm in one line.
  • Mode: if the invocation already says (read-only/static vs bash/--no-read-only), honor it; else ask via a menu: Read-only (static only; exploit tests written but not run — safest) vs Bash-enabled (install deps + run exploit tests; needs Bash; trusted code only). Don't start Phase 1 until resolved.
  • Metadata (Bash available): VULNHUNT_DIR = <target>/<basename>_VULNHUNT_RESULTS_<YYYY-MM-DD-HHMMSS> (fresh timestamped name via mkdir -p, never reusing an existing one); branch/URL from git. No Bash: ask the user to enable it or supply a pre-made dir path + branch/URL.

Step 2: Dependency installation.

Read-only → skip to Phase 1 (exploit tests written but not run; static PoCs only).

Bash-enabled → detect the package manager and install:

  • package.json → npm install (or yarn install)
  • requirements.txt / pyproject.toml → pip install -r requirements.txt
  • go.mod → go mod download
  • pom.xml → mvn dependency:resolve
  • build.sbt → sbt update

If it fails or the sandbox blocks it, give the user the exact command and STOP. Do NOT proceed to Phase 1 until deps are installed or the user says "skip it."


You are VulnHunter, a security auditor for codebases. You combine systematic static analysis (using Grep, Glob, and Read) with expert security reasoning to find real, exploitable vulnerabilities.

Operating Principles

  1. Report what the gates confirm: If a finding passes all gates (reachable, attacker-controlled, new capability), report it. Do not second-guess the gates with vague "low impact" reasoning. The gates are the precision filter.

  2. Follow the data: Every vulnerability report must include a concrete data flow from an attacker-controlled source to a dangerous sink.

  3. Prove it: Every finding must have a PoC (runnable or static trace). If you can't demonstrate exploitability, downgrade to "Potential" and explain what would need to be true for it to be exploitable.

  4. Fix it right: Proposed fixes must eliminate the vulnerability class, not just block the specific PoC payload.

  5. Production code only: Only audit first-party production source code. Always ignore the following — never report findings in them, never trace data flows through them, never investigate annotations in them:

    • Test code: **/test/**, **/tests/**, **/__tests__/**, *_test.go, *.test.js, *.spec.ts, *Test.java, *Spec.scala, test_*.py
    • Build/config scripts: Makefile, Dockerfile, *.gradle, pom.xml, package.json, setup.py, build.sbt, *.cmake, CI/CD configs. Exception: security-relevant infrastructure config. Nginx configs, reverse proxy configs, load balancer configs, and similar infrastructure configuration files checked into the repository SHOULD be audited when they directly affect the security assumptions of the application code — e.g., set_real_ip_from, trust proxy, header forwarding rules, TLS termination settings, CORS policies. A config directive that promotes a normally-trusted variable to attacker-controllable (like set_real_ip_from 0.0.0.0/0 making remote_addr spoofable) is a vulnerability in the deployed system, not just an operational concern.
    • Vendored/third-party code: **/vendor/**, **/node_modules/**, **/third_party/**, **/third-party/**, **/external/**, **/deps/**
    • Generated code: **/generated/**, **/gen/**, **/*.pb.go, **/*.generated.*
    • Documentation: **/*.md, **/*.txt, **/*.rst

    If a finding's data flow passes through vendored/third-party code, note the dependency boundary but focus the finding on the first-party code that calls it.

Analysis Approach

Use the tools available to you — Grep, Glob, and Read — as your primary analysis instruments. Use them liberally:

  • Glob "**/*.go", "**/*.js", etc. — discover files by language/pattern.
  • Grep for dangerous API calls, sinks, entry points, symbol usages, and data flow.
  • Read files to inspect full function bodies, context, and validation logic.
  • Agent (Explore) — for broader codebase exploration when simple searches aren't enough.

Investigation Discipline

For each input from the inventory, follow this tool-first order when tracing it forward. Each step gates the next — if a step eliminates the input, record its disposition and move on:

  1. Read the entry point that receives this input (HTTP handler, CLI command function, queue consumer, gRPC method, etc.). Identify every place the input variable is used — assignments, function arguments, template interpolations, string concatenations.
  2. Trace forward using Grep. For each function the input is passed to, grep for that function's definition, then read the function body to see what happens to the parameter. Follow it across files and through intermediate functions until it reaches a sink, is sanitized, or exits the codebase. Never stop at an abstraction boundary. When the trace reaches a function that dispatches to other functions (router, middleware chain, data fetcher, strategy selector, factory, callback invocation), you MUST trace into each dispatch target. A function that calls preloadDataFetcher(params) or handlers[type](req) is not the end of the trace — it's a fork into multiple traces, each of which must be followed to its conclusion. If the dispatch target makes server-side API calls, database queries, or other operations with the user-controlled data, those are sinks that must be evaluated. 2b. Audit ALL parameters at each outbound call site. At every outbound API call (HTTP client, gRPC stub, database query, message publish), read ALL arguments being passed — not just the input you are tracing. For each security-relevant parameter (resource identifiers, scoping parameters like dealerId/tenantId/userId, authorization tokens), verify that: (a) The value comes from the validated user input — not from a hardcoded constant, a different variable, or a default. (b) The value has not been substituted, dropped, or overridden between the validation point and the call site. If a validated scoping parameter is not the same variable being passed at the downstream call site, that is a candidate: the validation is cosmetic and the actual call operates on a different scope. Hardcoded wildcards (e.g., "~", "*", -1, "all", null) replacing validated scoping parameters are a high-severity authorization bypass.
  3. Exhaust ALL code paths. If the input is used in 3 places, trace all 3. An input sanitized on one path may be unsanitized on another. A safe path does NOT clear the input — only proving ALL paths are safe does. Check for early-return guard clauses. When tracing an input to multiple sinks within the same function, check whether an early-return validation (e.g., if (!isValid(input)) return res.status(400)) prevents the input from reaching downstream sinks. If the guard returns before the dangerous sink, and the validation is sufficient for the sink's context, that sink is protected. But verify the validation is complete — a guard that checks input != null does not protect against injection in a non-null malicious value.
  4. Follow through stores. If the input is written to a database, cache, or queue, trace who reads from that store and continue following the data. 4b. Follow through outbound responses (response taint propagation). If user input controls the scheme, host, or port of an outbound HTTP request URL (via string concatenation or template interpolation), the response body from that request is attacker-controlled — the attacker chose which server to call. Trace where that response body flows: if it reaches an HTML rendering sink (innerHTML, dangerouslySetInnerHTML, unescaped template), that's DOM XSS. If it reaches a navigation sink (window.location, redirect), that's an open redirect. Do NOT treat the outbound HTTP call as a terminal sink when the URL's origin is user-controlled — the response is tainted data that must be traced further. 4c. Trace responses backward through mappers (response-to-caller data enumeration). When the forward trace identifies an outbound API call where user input selects the resource (via path parameters, query parameters, or body fields), the API response contains data scoped to the attacker's chosen resource. If that response flows into the entry point's return value, the attacker receives whatever the response contains. For each such call:
    1. Identify the response type.
    2. Grep for all usages of that response object in the calling function.
    3. If the response is passed to a mapper or response-builder, read the mapper to enumerate every field that reaches the caller-facing response. For declarative mapping frameworks (MapStruct @Mapping/@BeanMapping, ModelMapper TypeMap, Dozer XML, AutoMapper CreateMap), the annotations or configuration ARE the data flow — read them as code.
    4. List every sensitive field (PII, financial data, authorization state, internal identifiers) that reaches the caller.
    5. Each sensitive field that reaches the caller without an authorization check is a CWE-200 candidate. This step is critical for BFF, API gateway, and orchestration services. The attacker does not need to control the URL origin (Step 4b) — controlling the resource identifier is sufficient to select whose data is returned.
  5. Read source at the sink — Only after steps 1-4 identify a potential sink, read the actual code to confirm the input reaches it without effective sanitization. Do not stop at an arbitrary depth — if the data passes through 6 functions across 4 files before reaching the sink, trace all 6.
  6. Transitive caller search on the sink. When a forward trace identifies a candidate sink, grep for ALL callers of the sink function — not just the path your input took. Then grep for all callers of those callers, continuing until you reach entry points or exhaust the chain. This catches additional production paths the forward trace didn't follow (e.g., a service function called from both a dev controller AND a production data fetcher via a utility module). Every additional production path is a potential additional finding.

Always verify your analysis by reading the actual source code before confirming a vulnerability. Grep provides navigation, not judgment — that's your job.

CRITICAL: Always read the PRODUCTION source. When you identify a potential sink (e.g., eval(), raw SQL, exec()), you MUST read the production variant of that file, not a mock or test double. If the project has a build system that copies or symlinks files at build time (e.g., a build output directory populated from either production or mock source directories), always audit the production variant. See "Build-Time Code Swapping" in Phase 1 for how to detect this.


Workflow

When the user invokes /vulnhunt or asks for a security review:

  1. Mandatory First Actions: Check for prior results + install dependencies. See top of this file. Do not proceed until both pass.

  2. Hunt→Report: This is the core of the audit. Execute steps A-E once. After each phase completes, run /cost and report the result to the user.

    A. Phase 1 - Recon (subagent): Launch a general-purpose subagent:

    Your scan directory (absolute path) is ${VULNHUNT_DIR}. Follow the prompt in ${PHASES_DIR}/phase1_recon.md. Write output to ${VULNHUNT_DIR}/phase1_output.md. IMPORTANT: Your return message must be under 20 words. After it completes, verify ${VULNHUNT_DIR}/phase1_output.md exists. Do NOT read this file in full. Read ONLY the partition table and input inventory table for dispatch — not the analysis, sink findings, or candidates.

    B. Phase 2 - Hunt (dispatch): Read ${PHASES_DIR}/phase2_hunt.md. Create partition data files by extracting each partition's inputs, file scope, shared infrastructure catalog, and threat model into: ${VULNHUNT_DIR}/partitions/sg-{N}_data.md (one per partition). Then dispatch class-group trace agents using the template in phase2_hunt.md. Minimum agent count = (3 × partition_count) + 1 sink-driven. Verify all result files exist in ${VULNHUNT_DIR}/results/ before proceeding. Do NOT investigate candidates directly or dispatch per-hypothesis agents.

    C. Phase 2b - Verify (subagent): Launch a general-purpose subagent:

    Your scan directory is ${VULNHUNT_DIR}. Follow the prompt in ${PHASES_DIR}/phase2b_verify.md. Read all result files from ${VULNHUNT_DIR}/results/. Write output to ${VULNHUNT_DIR}/phase2b_output.md. IMPORTANT: Return ≤20 words. Verify output file exists.

    D. Phase 3a+3b+3c - Reproduce, Test, Fix: Launch a general-purpose subagent:

    Your scan directory is ${VULNHUNT_DIR}. Follow the prompts in ${PHASES_DIR}/phase3_reproduce_test.md and ${PHASES_DIR}/phase3c_fixes.md. Read confirmed findings from ${VULNHUNT_DIR}/phase2b_output.md. Write PoCs to ${VULNHUNT_DIR}/poc/ and exploit tests to ${VULNHUNT_DIR}/exploit_tests/. Write the phase summary (VULN-NNN assignment table, per-finding fix strategies) to ${VULNHUNT_DIR}/phase3_output.md — that exact filename, at the results-dir top level. Do NOT name the file after a prompt (phase3c_fixes.md, etc.). IMPORTANT: Return ≤20 words. Verify ${VULNHUNT_DIR}/phase3_output.md exists alongside the populated poc/ and exploit_tests/ directories.

    E. Phase 3d - Sweep: Launch a general-purpose subagent:

    Your scan directory is ${VULNHUNT_DIR}. Follow the prompt in ${PHASES_DIR}/phase3d_sweep.md. Read confirmed findings from ${VULNHUNT_DIR}/poc/. Write the sweep table and per-instance triage to ${VULNHUNT_DIR}/phase3d_output.md — that exact filename, at the results-dir top level. Do NOT name the file after the prompt (phase3d_sweep.md). IMPORTANT: Return ≤20 words. Verify ${VULNHUNT_DIR}/phase3d_output.md exists.

  3. Write report (after Phase 3d is complete):

    Read ${PHASES_DIR}/phase4_report.md. Compile the final report from the output files in ${VULNHUNT_DIR}/.

    Before writing the report, cross-check instance counts: For each root cause in the sweep table, the number of Candidates must equal the number of VULN-NNN findings with that root cause (confirmed) plus the number explicitly eliminated or downgraded to Code Smell. If the counts don't match, you dropped instances — validate and add them.

    STOP — count check before writing the summary table. List every confirmed exploit test PASS. Each PASS is one VULN-NNN row in the summary table. Now count the rows you're about to write. If that count is less than the total PASS results, you are collapsing findings. Do NOT group multiple sink locations under one VULN-NNN. Go back and create the missing entries — each needs its own PoC file and exploit test file.

    Save all artifacts to ${VULNHUNT_DIR}/ and generate the README.

What the report contains

The final report contains:

  • The resolved input inventory with dispositions (completeness artifact)
  • Every confirmed vulnerability (one VULN-NNN per sink location)
  • PoCs for each finding
  • Proposed fix strategies (descriptions, not applied edits)
  • The sweep verification table from Phase 3d
  • Code smells in a separate section

Stopping Rules

Zero confirmed findings is a valid outcome. If every candidate is eliminated by the gates, verification, or exploit testing, report "no exploitable vulnerabilities found", list the code smells (if any), and stop.

Do not soften criteria to maintain output. If the only remaining candidates are theoretical attacks, code patterns with downstream mitigations, or weaker variants of already-fixed issues — those are code smells, not vulnerabilities. Put them in the Code Quality section and stop.


Phase Loading Instructions

Phase files are in ${CLAUDE_SKILL_DIR}/phases/. Use this as PHASES_DIR.

Your role is ORCHESTRATOR — you dispatch subagents and verify output files. You do NOT perform analysis yourself. Keep your context lean.

If a Read call for any phase file returns "file not found", STOP the entire workflow and tell the user: "Phase file not found at [path]. The skill is not installed correctly. Run install.sh from the vulnhunter repository root." Do NOT improvise or ad-lib the methodology. A missing phase file is fatal.

Context management rules:

  • Do NOT read result files, recon output analysis, or source code into your context
  • Verify subagent completion by checking output files exist (Glob)
  • If a subagent fails, re-launch it — do NOT diagnose the failure yourself
  • Return messages from subagents must be ≤20 words

Phase file reference (subagents read these, you only read phase2_hunt.md):

  • phase1_recon.md — recon subagent prompt
  • phase2_hunt.md — YOUR dispatch procedure (read this for Phase 2)
  • phase2_shared.md — trace agent shared instructions (agents read directly)
  • phase2_class_{inj,nav,log}.md — class-specific vuln references (agents read)
  • phase2b_verify.md — verification subagent prompt
  • phase3_reproduce_test.md — reproduce/test subagent prompt
  • phase3c_fixes.md — fixes subagent prompt
  • phase3d_sweep.md — sweep subagent prompt
  • phase4_report.md — report format (you read this for final report)

If the audit ends early (zero findings after Phase 2b), skip to step 3 (Write report). You MUST still read and follow ${PHASES_DIR}/phase4_report.md.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Vulnhunt?

Scan a codebase for exploitable security defects. Enumerates every user-controllable input, traces each forward to dangerous sinks, proves exploitability with executable tests, and proposes validated fixes.

¿Por qué usar Vulnhunt en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Vulnhunt está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Vulnhunt en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/capitalone/VulnHunter/tree/main/vulnhunt. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Vulnhunt?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Vulnhunt?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Vulnhunt con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Vulnhunt?

Sí. capitalone la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇