Back to skill

Security audit

WatchOrFight - Predict

Security checks for vulnerabilities and agentic risk

Overview

This skill supports real-money on-chain prediction trading, but it gives a mutable external CLI access to a wallet private key and starts users on mainnet transactions with limited guardrails.

Install only if you are comfortable giving the WatchOrFight CLI a dedicated wallet private key. Use a fresh low-balance wallet, start on testnet, verify NETWORK before running commands, avoid global or unpinned installs where possible, and manually review any transaction or approval that can spend USDC or ETH.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
SKILL.md:5
Finding

Mutable Third-Party CLI Handles a Raw Wallet Private Key and Financial Transactions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 5 and 66–73
Vulnerability Type: Supply-chain exposure through an unpinned external npm package
Risk Level: High

Vulnerable Code

yaml
metadata: {"openclaw":{"emoji":"📊","always":false,"os":["darwin","linux"],"requires":{"bins":["node","npx"],"env":["PRIVATE_KEY"]},"primaryEnv":"PRIVATE_KEY","source":"https://github.com/wof-games/prediction-mcp","homepage":"https://watchorfight.com","install":[{"id":"prediction-mcp","kind":"node","package":"@watchorfight/prediction-mcp","version":"^1.3.5","bins":["wof-predict"],"label":"Install WatchOrFight Prediction CLI (npm)"}]}}
bash
npm install -g @watchorfight/prediction-mcp
text
| Variable | Required | Description |
|---|---|---|
| `PRIVATE_KEY` | Yes | Wallet private key (needs ETH for gas + USDC for stakes) |
| `NETWORK` | No | `mainnet` (default) or `testnet` |
| `RPC_URL` | No | Custom RPC endpoint |

Technical Analysis

The Skill delegates all executable behavior to the external @watchorfight/prediction-mcp npm package. The metadata permits any semver-compatible release through ^1.3.5, while the documented global installation command does not specify a version at all. Neither installation path provides an integrity hash or lockfile.

This dependency operates in a particularly sensitive trust context: it receives the PRIVATE_KEY environment variable, signs blockchain transactions, manages USDC approvals, and can transfer funds through prediction-market transactions. A newly published, compromised, or malicious package version could therefore access the wallet credential during installation or execution.

The executable package source is not included in the audited artifact, so its network destinations, transaction construction, filesystem permissions, and handling of the private key cannot be independently verified. The static warning concerning sensitive network behavio ...[truncated 2198 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to an exact reviewed version instead of using ^1.3.5 or an unversioned installation command.
  2. Supply and verify a package integrity hash or signed provenance before installation. Commit a lockfile where the deployment model permits it.
  3. Include the executable source in the reviewed artifact, or link the package to an immutable source commit and reproducible build.
  4. Audit all transitive dependencies and monitor the npm package for ownership changes and unexpected releases.
  5. Avoid global installation. Run the package in an isolated environment with restricted filesystem and network access.
  6. Disable npm lifecycle scripts where compatible with the package, or explicitly review every required install script.
  7. Replace direct raw-key access with a constrained signer, hardware wallet, delegated session key, or policy-controlled signing service. Enforce chain ID, approved contract addresses, token-spending caps, and transaction-value limits.
  8. Require explicit user confirmation for token approvals, transfers, market stakes, and identity-registration transactions. Display the destination, method, assets, and maximum value before signing.
  9. Continue requiring a dedicated wallet, but enforce low balances and narrowly scoped token allowances rather than relying only on documentation.
  10. Document the package's authorized network endpoints and ensure that private-key material is never included in requests, telemetry, logs, error reports, or analytics.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 70)May include surrounding context.

md
**Use a dedicated game wallet.** Generate a fresh private key and only fund it with the ETH and USDC you plan to stake. This skill only interacts with the [PredictionArena contract](https://basescan.org/address/0xA62bE1092aE3ef2dF062B9Abef52D390dF955174) and USDC approvals. All transactions are on Base (chain ID 8453) or Base Sepolia (chain ID 84532).

Secrets (commit-reveal data) are persisted to `~/.wof-predict/secrets.json` so you can reveal positions across sessions.

## Core Tools

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 195)May include surrounding context.

md
**Use a dedicated game wallet.** Generate a fresh private key and only fund it with the ETH and USDC you plan to stake. This skill only interacts with the [PredictionArena contract](https://basescan.org/address/0xA62bE1092aE3ef2dF062B9Abef52D390dF955174) and USDC approvals. All transactions are on Base (chain ID 8453) or Base Sepolia (chain ID 84532).

Secrets (commit-reveal data) are persisted to `~/.wof-predict/secrets.json` so you can reveal positions across sessions.

## Core Tools

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 204)May include surrounding context.

md
**Use a dedicated game wallet.** Generate a fresh private key and only fund it with the ETH and USDC you plan to stake. This skill only interacts with the [PredictionArena contract](https://basescan.org/address/0xA62bE1092aE3ef2dF062B9Abef52D390dF955174) and USDC approvals. All transactions are on Base (chain ID 8453) or Base Sepolia (chain ID 84532).

Secrets (commit-reveal data) are persisted to `~/.wof-predict/secrets.json` so you can reveal positions across sessions.

## Core Tools

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The quick-start section prominently instructs users to run trading commands that can submit irreversible on-chain transactions and spend real USDC on mainnet, but it does not place an explicit warning adjacent to those commands. In an agent context, concise examples are often copied verbatim, so omission of a clear spending-risk warning materially increases the chance of unintended fund loss.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.