cosmos-vulnerability-scanner
Qué hace
Revisa módulos de blockchain de Cosmos y contratos CosmWasm en busca de problemas críticos para el consenso, como la parada de la cadena o la pérdida de fondos. Es para auditores y equipos de blockchain que revisan código Cosmos personalizado.
Cuándo usarla
- ✓Cuando un auditor revisa módulos personalizados de una blockchain con Cosmos SDK.
- ✓Cuando un equipo quiere revisar una integración de IBC antes del lanzamiento.
- ✓Cuando un equipo investiga la causa de una parada de la cadena en una cadena Cosmos.
Link de la skill
https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/cosmos-vulnerability-scanner/SKILL.mdCó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
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Revisa mi módulo personalizado de Cosmos en busca de algo que pueda detener la cadena o perder fondos.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
La skill ejecuta revisiones en paralelo, cada una enfocada en un grupo de problemas conocidos, y comprueba si cada hallazgo está en la ruta crítica para el consenso. Guarda cada hallazgo como un archivo markdown propio en una carpeta de salida.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de GitHub.
Cosmos Vulnerability Scanner
Purpose
Scan Cosmos SDK modules and CosmWasm contracts for vulnerabilities that cause chain halts, consensus failures, or fund loss. Spawns parallel scanning agents — each specializing in a vulnerability category — that return findings to the main skill, which then writes them as individual markdown files to an output directory.
Output directory: defaults to .bughunt_cosmos/. If the user specifies a different directory in their prompt, use that instead.
When to Use
- Auditing Cosmos SDK modules (custom
x/modules) - Reviewing CosmWasm smart contracts
- Pre-launch security assessment of Cosmos chains
- Investigating chain halt incidents
When NOT to Use
- Pure Solidity/EVM audits without Cosmos SDK — use Solidity-specific tools
- CometBFT consensus engine internals — this covers SDK modules, not the consensus layer itself
- General Go code review with no blockchain context
- Cosmos SDK application logic that is not consensus-critical (e.g., CLI commands, REST endpoints)
- CosmWasm contract-only audits on chains without custom SDK modules — use the CosmWasm checklist items alone
Essential Principles
- Consensus path is king — A bug only matters for chain halt/fund loss if it's on the consensus-critical execution path (BeginBlock, EndBlock, FinalizeBlock, msg_server handlers, AnteHandler). Always verify a finding is reachable from consensus before reporting it.
- State divergence = chain halt — Any non-determinism that causes validators to compute different state roots will halt the chain. This is the highest-severity class because it affects all validators simultaneously.
- Check the version — Cosmos SDK has breaking changes across major versions (v0.47 removed GetSigners, v0.50 added ABCI 2.0, v0.53 deprecated ValidateBasic). Always check
go.modversions before applying patterns. - False positives waste audit time — A map iteration in a CLI command is not a consensus bug. A panic in a query handler does not halt the chain. Verify the execution context before flagging.
- Cross-module interactions are where bugs hide — The most severe findings (IBC reentrancy, EVM/Cosmos state desync, authz escalation) involve interactions between modules, not bugs within a single module.
Scanning Workflow
Phase 1: Discovery (synchronous)
Entry: Target codebase path provided by user. Codebase contains Go source (e.g., x/ modules, go.mod) or Rust contracts with cosmwasm_std.
Run a synchronous subagent (Agent tool) with the full contents of DISCOVERY.md as its prompt. The agent must:
- Follow the Discovery workflow to explore the target codebase
- Return the full CLAUDE.md content (the technical inventory and threat model) in its response
- Return a structured summary with exactly these fields:
PLATFORM: pure-cosmos | evm | wasm (pick one; if multiple, comma-separated)
IBC_ENABLED: true | false
SDK_VERSION: <version from go.mod>
IBC_GO_VERSION: <version from go.mod, or "n/a">
CUSTOM_MODULES: <comma-separated list of x/* modules>
After the subagent returns, you (the main skill) Write the CLAUDE.md to the target repo root. Save its path and the discovery values — these feed into Phase 2.
Exit: CLAUDE.md written by main skill. PLATFORM, IBC_ENABLED, SDK_VERSION, IBC_GO_VERSION, and CUSTOM_MODULES captured.
Phase 2: Parallel Vulnerability Scan
Spawn scanning agents in a single message for maximum parallelism. Use the Agent Prompt Template below, filling in the reference file for each agent. Subagents only need read access (Grep, Glob, Read) — they return findings in their response and the main skill writes the files.
Always spawn these 3 agents:
| Agent Name | Reference File | Scope |
|---|---|---|
core-scanner |
VULNERABILITY_PATTERNS.md |
§1-9: non-determinism, ABCI, signers, validation, handlers, ante security |
state-scanner |
STATE_VULNERABILITY_PATTERNS.md |
§11-23: bookkeeping, bank, pagination, events, tx replay, governance, arithmetic, encoding, deprecated modules |
advanced-scanner |
ADVANCED_VULNERABILITY_PATTERNS.md |
§24-27: storage keys, consensus validation, circuit breaker, crypto |
Spawn conditionally (in the same parallel message):
| Agent Name | Condition | Reference File |
|---|---|---|
evm-scanner |
PLATFORM includes evm |
EVM_VULNERABILITY_PATTERNS.md |
| ` |
Preguntas frecuentes
¿Qué significa crítico para el consenso?
La skill se centra en el código que se ejecuta durante el procesamiento de bloques y de transacciones, porque los errores ahí pueden detener la cadena o provocar pérdida de fondos.
¿Cubre CosmWasm?
Sí. Incluye patrones de contratos CosmWasm junto con las revisiones del Cosmos SDK.
¿Revisa el motor principal de la cadena?
No. La skill indica que cubre los módulos del SDK, no el motor de consenso en sí.
Detalles
Descripción original del autor
Scans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence. 25 core + 16 IBC + 10 EVM + 3 CosmWasm patterns. Use when auditing custom x/ modules, reviewing IBC integrations, or assessing pre-launch chain security. Updated for SDK v0.53.x.
repo: trailofbits/skills
Popularidad
- Estrellas en GitHub
- 8,0 mil
- Posición en el ranking
- #12660
- Licencia
- CC-BY-SA-4.0
- Actualizada
- 2/11/2026
Comentarios
- …
Más skills de este repositorio
audit-context-building
8,0 milAyuda a tu agente a conocer un código desconocido antes de una revisión de seguridad, mapeando qué supone, garantiza y necesita cada función.
algorand-vulnerability-scanner
8,0 milAyuda a tu agente a revisar contratos de Algorand en TEAL o PyTeal en busca de 11 problemas de seguridad comunes, como el rekeying o las tarifas sin control.
audit-prep-assistant
8,0 milAyuda a tu agente a preparar tu código para una auditoría de seguridad externa, con análisis estático, pruebas, limpieza de código muerto y buena documentación.
cairo-vulnerability-scanner
8,0 milAyuda a tu agente a revisar contratos de Cairo en StarkNet en busca de 6 problemas graves, como desbordamientos, mensajes arriesgados entre capas y firmas repetidas.
Skills parecidas
reverse-engineer-anything
422 milAyuda a tu agente a revisar apps y paquetes ya publicados para explicar sus funciones, comparar versiones o guiar una reconstrucción, usando la herramienta REA.
1password
394 milAyuda a tu agente a instalar la CLI de 1Password, iniciar sesión y leer o inyectar secretos sin imprimir sus valores en el chat.
healthcheck
394 milAyuda a tu agente a auditar el ordenador o servidor que ejecuta OpenClaw en busca de riesgos de seguridad, como SSH, cortafuegos, actualizaciones y copias de seguridad, y después sugerir arreglos seguros.