cosmos-vulnerability-scanner

Scans Cosmos SDK modules and CosmWasm contracts for consensus-critical vulnerability patterns.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/TECH-HY/SKILLS --skill cosmos-vulnerability-scanner-tech-hy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cosmos-vulnerability-scanner
Source: https://github.com/TECH-HY/SKILLS/tree/main/skills/cosmos-vulnerability-scanner
Command: npx skills add https://github.com/TECH-HY/SKILLS --skill cosmos-vulnerability-scanner-tech-hy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Cosmos SDK blockchains and CosmWasm contracts contain platform-specific vulnerabilities like non-determinism, ABCI panics, and incorrect GetSigners that can halt chains or cause fund loss, and these issues are hard to catch with generic Go or Rust linters. ## Core Features & Use Cases - Nine Vulnerability Patterns: Detects non-determinism, incorrect GetSigners, ABCI panics, slow ABCI methods, missing error handling, broken bookkeeping, rounding errors, message priority issues, and unregistered handlers. - Severity-Ranked Reporting: Produces findings with file locations, vulnerable code snippets, attack scenarios, and concrete remediation code. - Audit Workflow Guidance: Provides grep-based detection commands, benchmarking approaches, invariant testing patterns, and a pre-audit checklist. - Use Case: Before launching a custom Cosmos chain, run the scan across your x/ modules to catch map iteration in EndBlocker or unchecked bankKeeper.SendCoins errors that could halt the chain or lose funds. ## Quick Start Scan my Cosmos SDK project for consensus-critical vulnerabilities and report any findings with severity and fixes.

Frequently Asked Questions about cosmos-vulnerability-scanner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find non-determinism bugs in a Cosmos SDK chain?

Search consensus-critical code for map iteration, platform-dependent types like int and float64, goroutines, select statements, rand, and time.Now(). The skill provides grep commands and CodeQL guidance, plus mitigations such as sorting map keys and using ctx.BlockTime().

What vulnerabilities should I check before launching a Cosmos chain?

Prioritize non-determinism, ABCI method panics, slow BeginBlocker or EndBlocker loops, and incorrect GetSigners, since these can halt the chain. Then check missing error handling on bankKeeper.SendCoins, broken bookkeeping versus x/bank, and rounding errors in sdk.Dec arithmetic.

Does this scanner work with CosmWasm contracts?

Yes, it detects CosmWasm projects via Rust files with cosmwasm_std imports and entry_point functions. The referenced pattern list covers CosmWasm issues like missing denom validation, improper reply handling, IBC packet validation, and reentrancy via submessages.

Why does my Cosmos chain halt in EndBlocker?

Chain halts in EndBlocker usually come from panics in sdk.NewCoin or sdk.NewDec operations, division by zero, or unbounded iterations exceeding block time. Validate inputs before panic-prone SDK calls, bound batch sizes, and benchmark with maximum expected state.

What are the limitations of static scanning for Cosmos vulnerabilities?

Static pattern matching cannot confirm exploitability or catch all logic bugs, so manual review remains critical for consensus issues. The skill recommends complementing scans with cross-architecture builds, fuzz testing, ABCI benchmarks, and invariant checks in CI.