You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/building-secure-contracts/skills/cosmos-vulnerability-scanner/SKILL.md
+27-25Lines changed: 27 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ description: "Scans Cosmos SDK blockchain modules and CosmWasm contracts for con
7
7
8
8
## Purpose
9
9
10
-
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 write findings as individual markdown files to an output directory.
10
+
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.
11
11
12
-
**Output directory**: defaults to `.bughunt_cosmos/`. If the user specifies a different directory in their prompt, use that instead and pass it to all subagents.
12
+
**Output directory**: defaults to `.bughunt_cosmos/`. If the user specifies a different directory in their prompt, use that instead.
13
13
14
14
## When to Use
15
15
@@ -40,10 +40,10 @@ Scan Cosmos SDK modules and CosmWasm contracts for vulnerabilities that cause ch
40
40
41
41
**Entry**: Target codebase path provided by user. Codebase contains Go source (e.g., `x/` modules, `go.mod`) or Rust contracts with `cosmwasm_std`.
42
42
43
-
Run a **synchronous subagent** (Agent tool, `subagent_type: general-purpose`) with the full contents of [DISCOVERY.md](resources/DISCOVERY.md) as its prompt. The agent must:
43
+
Run a **synchronous subagent** (Agent tool) with the full contents of [DISCOVERY.md](resources/DISCOVERY.md) as its prompt. The agent must:
44
44
45
45
1. Follow the Discovery workflow to explore the target codebase
46
-
2.Write a `CLAUDE.md` at the target repo root with the technical inventory and threat model
46
+
2.Return the full CLAUDE.md content (the technical inventory and threat model) in its response
47
47
3. Return a structured summary with exactly these fields:
48
48
49
49
```
@@ -54,13 +54,13 @@ IBC_GO_VERSION: <version from go.mod, or "n/a">
54
54
CUSTOM_MODULES: <comma-separated list of x/* modules>
55
55
```
56
56
57
-
Save the returned values and the path to the written CLAUDE.md — these feed into Phase 2.
57
+
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.
58
58
59
-
**Exit**: CLAUDE.md written. PLATFORM, IBC_ENABLED, SDK_VERSION, IBC_GO_VERSION, and CUSTOM_MODULES captured.
59
+
**Exit**: CLAUDE.md written by main skill. PLATFORM, IBC_ENABLED, SDK_VERSION, IBC_GO_VERSION, and CUSTOM_MODULES captured.
60
60
61
61
### Phase 2: Parallel Vulnerability Scan
62
62
63
-
Spawn scanning agents **in a single message** for maximum parallelism. Use the Agent Prompt Template below, filling in the reference file for each agent.
63
+
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.
64
64
65
65
**Always spawn these 3 agents:**
66
66
@@ -78,11 +78,9 @@ Spawn scanning agents **in a single message** for maximum parallelism. Use the A
78
78
|`ibc-scanner`| IBC_ENABLED is `true`|`IBC_VULNERABILITY_PATTERNS.md`|
79
79
|`cosmwasm-scanner`| PLATFORM includes `wasm`|`COSMWASM_VULNERABILITY_PATTERNS.md`|
80
80
81
-
All scanning agents use `subagent_type: general-purpose` (need Write for finding files).
82
-
83
81
#### Agent Prompt Template
84
82
85
-
Construct each agent's prompt by replacing `{REFERENCE_FILE_PATH}` with the full path to the reference file (under `{baseDir}/resources/`), `{CLAUDE_MD_PATH}` with the path to the CLAUDE.md written in Phase 1, and `{OUTPUT_DIR}` with the output directory (default `.bughunt_cosmos`):
83
+
Construct each agent's prompt by replacing `{REFERENCE_FILE_PATH}` with the full path to the reference file (under `{baseDir}/resources/`) and `{CLAUDE_MD_PATH}` with the path to the CLAUDE.md written in Phase 1:
86
84
87
85
~~~
88
86
Perform a very thorough security scan of a Cosmos SDK codebase for specific vulnerability patterns.
0 commit comments