Back to skill

Security audit

Crunch Coordinate

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for CrunchDAO CLI operations, but it can directly run wallet-backed commands that move or drain funds without requiring a final safety confirmation.

Install only if you intend to let an agent help operate CrunchDAO wallets and protocol state. Before any deposit, drain, stake, withdraw, delegate, checkpoint, create, start, or end command, require the agent to show the exact command, active profile, wallet public address, network/RPC, target, token, amount, and expected effect, then get explicit confirmation. Prefer devnet and dry runs where available, and pin/verify package versions before installing.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding
Unpinned Global Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:17-25` - `references/cli-reference.md:8-11` - `references/cli-reference.md:405-408` **Vulnerability Type**: Supply-chain exposure through mutable, unpinned dependencies **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:17-25`: ```markdown | Package | Source | Purpose | |---------|--------|---------| | `@crunchdao/crunch-cli` | [npm](https://www.npmjs.com/package/@crunchdao/crunch-cli) | CrunchDAO protocol CLI (coordinators, competitions, staking) | **Agent rules for package installation:** - **Only install `@crunchdao/crunch-cli`** from the official npm registry - **No custom registry URLs** — no `--registry` overrides - **Ask the user before installing** if not already present ``` From `references/cli-reference.md:8-11`: ```markdown ## Installation ```bash npm install -g @crunchdao/crunch-cli ``` ``` From `references/cli-reference.md:405-408`: ```markdown ### Model & Simulation Commands > **Note:** Requires Python `crunch-cli` package (`pip install crunch-cli`) ``` ### Technical Analysis The documented installation commands do not pin dependencies to exact, reviewed versions. Both npm and pip therefore resolve a mutable package version at installation time. The npm dependency is installed globally. npm installation can execute package lifecycle scripts with the permissions of the user running npm, while a global installation makes the resulting executable available broadly in that user's environment. An upstream package compromise, malicious future release, or registry account takeover could consequently introduce executable code after this Skill has already been reviewed. The Python package instruction creates an additional unpinned dependency path. It also conflicts with the Skill's stated policy that only `@crunchdao/crunch-cli` should be installed. The documentation does not establish that the npm and Python packages have the same maintainer, provenance, implementation, ...[truncated 1909 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every dependency to an exact, reviewed version, for example: ```bash npm install -g @crunchdao/crunch-cli@1.1.6 ``` The pinned version should be updated only after a security review. 2. Prefer a project-local installation over a global installation: ```bash npm install --save-exact @crunchdao/crunch-cli@1.1.6 npx crunch-cli --version ``` 3. Commit and verify a lockfile when the surrounding distribution model permits it. Use npm integrity metadata and provenance verification where available. 4. Document the expected package publisher, repository, version, checksums, and provenance so that installation can fail closed when any attribute differs. 5. Reconcile the Python package instruction with the npm-only installation policy. Remove it unless its publisher and necessity have been independently verified. 6. If the Python package is required, pin an exact version and hash, preferably through a requirements file using hash checking: ```text crunch-cli==<reviewed-version> --hash=sha256:<reviewed-hash> ``` 7. Continue requiring explicit user authorization before installation, and show the exact package name, version, registry, and installation scope in the confirmation prompt. 8. Do not recommend `sudo`, administrator execution, or any other privilege elevation for package installation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:72
Finding
Financial and Destructive Commands Execute Without Mandatory Confirmation<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:72-100` - `SKILL.md:107-112` - `references/cli-reference.md:151-176` - `references/cli-reference.md:271-329` **Vulnerability Type**: Insufficient safeguards for state-changing and asset-moving operations **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:72-100`: ```markdown | User Phrase | CLI Command | |-------------|-------------| | `get/show crunch <name>` | `crunch-cli crunch get "<name>"` | | `list crunches` | `crunch-cli crunch list` | | `get/show coordinator [address]` | `crunch-cli coordinator get [address]` | | `list coordinators` | `crunch-cli coordinator list` | | `get config` | `crunch-cli coordinator get-config` | | `checkpoint for <name>` | `crunch-cli crunch checkpoint-get-current "<name>"` | | `create checkpoint <name>` | `crunch-cli crunch checkpoint-create "<name>" prizes.json` | | `deposit reward <name> <amount>` | `crunch-cli crunch deposit-reward "<name>" <amount>` | | `drain <name>` | `crunch-cli crunch drain "<name>"` | | `create/register cruncher` | `crunch-cli cruncher create` | | `register for <name>` | `crunch-cli cruncher register "<name>"` | | `claim rewards <name>` | `crunch-cli cruncher claim "<name>"` | | `show staking positions` | `crunch-cli staking positions` | | `stake/deposit <amount>` | `crunch-cli staking deposit <amount>` | | `delegate to <coordinator>` | `crunch-cli staking delegate "<coordinator>" <amount>` | | `show staking rewards` | `crunch-cli staking rewards` | | `claim staking rewards` | `crunch-cli staking claim` | | `undelegate from <coordinator>` | `crunch-cli staking undelegate "<coordinator>" <amount>` | | `withdraw stake <amount>` | `crunch-cli staking withdraw <amount>` | | `init workspace <name>` | `crunch-cli init-workspace "<name>"` | | `list scenarios/simulations` | `crunch-cli model list` | | `run simulation <scenario>` | `crunch-cli model run "<scenario>"` | | `register coordinator <name>` | `crunch-cli coordinator register " ...[truncated 4727 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Divide commands into read-only and state-changing categories. Read-only commands may execute directly; state-changing commands must use a separate guarded workflow. 2. Require `--dry-run` whenever the CLI supports it. Do not proceed if a dry run fails or if the preview cannot be obtained. 3. Before execution, display a transaction summary containing: - Exact command. - Active profile. - Wallet public address, without exposing private-key contents. - Network and RPC hostname. - Operation type. - Competition or coordinator target. - Token and amount. - Estimated fees. - Expected state transition. 4. Require explicit, operation-specific confirmation after showing the summary. A prior general request should not substitute for final confirmation. 5. Apply enhanced confirmation to destructive or high-impact commands such as `drain`, `withdraw`, `delegate`, `undelegate`, `deposit-reward`, checkpoint creation, competition creation, and competition start/end. 6. Validate all numerical values as finite, positive, bounded amounts in the expected token denomination. Reject malformed, negative, ambiguous, or unexpectedly large values. 7. Validate Solana addresses and require the user to confirm any target address that was not explicitly supplied in the current request. 8. Avoid silently switching persistent profiles. Prefer per-command flags, or request confirmation before `config use` changes the active profile. 9. Default financial activity to devnet unless the user explicitly selects mainnet and confirms the increased risk. 10. Never read or display wallet private-key contents. Wallet signing should remain delegated to the established wallet mechanism. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Missing User Warnings

High
Confidence
97% confidence
Finding
`crunch drain` is a destructive fund-removal operation, yet the reference gives no warning that it can withdraw remaining USDC and may be irreversible once submitted on-chain. In a coordinator-management skill, this is especially dangerous because an agent may treat the command as routine cleanup and trigger unintended asset movement from a live competition.

Session Persistence

Medium
Category
Rogue Agent
Content
- **Stored in:** User-managed file on disk; path referenced in `~/.crunch/config.json`

**Agent rules for wallets:**
- **Never create or generate wallet keypairs** unless the user explicitly asks and understands the security implications
- **Never read or display** the contents of wallet keypair files
- **Never commit wallet files** to git — always verify `.gitignore` covers them
- **Ask the user** for the wallet path — never assume or search for keypair files
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation presents a live fund-transfer command (`crunch deposit-reward`) as a normal workflow step without clearly warning that it moves real USDC on-chain. In an agent skill context, terse operational references can be turned into automated actions, so the absence of explicit confirmation, dry-run guidance, and asset-impact warnings increases the chance of accidental financial loss.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The staking commands include deposit, withdraw, delegate, and undelegate operations that directly affect on-chain token positions, but the reference does not warn about real asset movement, lockups, timing, or delegation consequences. Because this skill is specifically for managing coordinators and staking via CLI, the operational context makes omission of these warnings more dangerous: an agent or operator could execute financially meaningful transactions as if they were informational commands.

Static analysis

No suspicious patterns detected.