cosmos-vulnerability-scanner
Was er macht
Prüft Module von Cosmos-Blockchains und CosmWasm-Contracts auf konsensrelevante Probleme, etwa Chain-Stopps und Geldverlust. Er richtet sich an Auditoren und Blockchain-Teams, die eigenen Cosmos-Code prüfen.
Wann du ihn nutzt
- ✓Wenn ein Auditor eigene Module in einer Cosmos-SDK-Blockchain prüft.
- ✓Wenn ein Team eine IBC-Integration vor dem Start prüfen will.
- ✓Wenn ein Team die Ursache eines Chain-Stopps auf einer Cosmos-Chain untersucht.
Link zum Skill
https://github.com/trailofbits/skills/blob/main/plugins/building-secure-contracts/skills/cosmos-vulnerability-scanner/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Prüfe mein eigenes Cosmos-Modul darauf, ob etwas die Chain anhalten oder Geld verlieren lassen könnte.”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Skill führt parallele Prüfungen aus, jede auf eine Gruppe bekannter Probleme fokussiert, und prüft, ob jeder Fund auf dem konsensrelevanten Pfad liegt. Jeden Fund speichert er als eigene Markdown-Datei in einem Ausgabeordner.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von 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 |
| ` |
Häufige Fragen
Was gilt als konsensrelevant?
Der Skill konzentriert sich auf Code, der bei der Blockverarbeitung und der Transaktionsabwicklung läuft, denn Fehler dort können eine Chain anhalten oder Geld kosten.
Deckt er CosmWasm ab?
Ja. Er enthält CosmWasm-Muster zusätzlich zu den Prüfungen des Cosmos SDK.
Prüft er die Kern-Engine der Chain?
Nein. Der Skill sagt, dass er die SDK-Module abdeckt, nicht die Konsens-Engine selbst.
Details
Originalbeschreibung des Autors
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
Beliebtheit
- GitHub-Sterne
- 8.0k
- Platz im Ranking
- #12660
- Lizenz
- CC-BY-SA-4.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
audit-context-building
8.0kHilft deinem Agenten, eine unbekannte Codebasis vor einem Sicherheitsreview zu verstehen, und zeigt, was jede Funktion voraussetzt, garantiert und wovon sie abhängt.
algorand-vulnerability-scanner
8.0kHilft deinem Agenten, Algorand-Smart-Contracts in TEAL oder PyTeal auf 11 häufige Sicherheitsprobleme zu prüfen, etwa Rekeying-Angriffe und ungeprüfte Gebühren.
audit-prep-assistant
8.0kHilft deinem Agenten, eine Codebasis auf ein externes Sicherheitsreview vorzubereiten, mit statischer Analyse, Testabdeckung, Bereinigung von totem Code und klarer Dokumentation.
cairo-vulnerability-scanner
8.0kHilft deinem Agenten, Cairo-Smart-Contracts auf StarkNet auf 6 ernste Probleme zu prüfen, etwa Arithmetik-Überläufe, riskante Nachrichten zwischen Schichten und Signatur-Replay.
Ähnliche Skills
reverse-engineer-anything
422kHilft deinem Agenten, fertige Apps und Pakete zu untersuchen, um Funktionen zu erklären, Versionen zu vergleichen oder einen Nachbau zu leiten, mit dem REA-Tool.
1password
394kHilft deinem Agenten, die 1Password-Kommandozeile einzurichten, sich anzumelden und Geheimnisse zu lesen oder einzufügen, ohne deren Werte im Chat auszugeben.
healthcheck
394kHilft deinem Agenten, den Computer oder Server, auf dem OpenClaw läuft, auf Sicherheitsrisiken wie SSH, Firewall, Updates und Backups zu prüfen und sichere Korrekturen vorzuschlagen.