Back to skill

Security audit

OpenClawCash

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real OpenclawCash wallet skill, but it needs review because it can move funds and make persistent account changes with broad session-level approval.

Install only if you intend to let an agent operate an OpenClawCash wallet with real financial authority. Prefer per-action confirmation, use tightly scoped API keys and wallet policies, avoid importing private keys through the agent unless necessary, pin or review the MCP package before use, and treat webhook and user-tag changes as privileged account administration.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agentwalletapi.sh:268
Finding
Immutable Global User Tag Can Be Set Without Enforced Confirmation## Vulnerability Details **File Location**: `scripts/agentwalletapi.sh`, lines 268–280 **Vulnerability Type**: Missing confirmation gate for an irreversible authenticated state change **Risk Level**: Medium ### Vulnerable Code ```bash user-tag-set) USER_TAG="$2" if [ -z "$USER_TAG" ]; then echo "Usage: agentwalletapi.sh user-tag-set <userTag> [--yes]" exit 1 fi json_escape_var USER_TAG_ESC "$USER_TAG" BODY="{\"userTag\":\"$USER_TAG_ESC\"}" curl -s -X PUT \ -H "X-Agent-Key: $AGENTWALLETAPI_KEY" \ -H "Content-Type: application/json" \ -d "$BODY" \ "$BASE_URL/api/agent/user-tag" | pretty_print_json ;; ``` ### Technical Analysis The `user-tag-set` command performs an authenticated `PUT` request that sets the account-wide checkout user tag. The project describes this value as one-time and immutable in `SKILL.md:226`, while both `SKILL.md:90` and the CLI usage text present `--yes` for this operation. However, the implementation does not invoke `confirm_risky_action` and does not otherwise check `FORCE_RISKY`. Consequently, supplying or omitting `--yes` has no effect: the persistent change is submitted immediately whenever the command receives a nonempty tag. This crosses the boundary between a local CLI request and persistent authenticated account state without enforcing the confirmation control represented by the interface. Although this is not evidence of malicious intent, it is a reachable discrepancy for an irreversible operation. ### Attack Path 1. The CLI has access to a configured `AGENTWALLETAPI_KEY`. 2. An Agent workflow or local caller invokes: ```bash bash scripts/agentwalletapi.sh user-tag-set studio ``` No `--yes` flag or interactive confirmation is required. 3. The script places the supplied value in a JSON body. 4. It immediately sends an authenticated `PUT` request to `/api/agent/user-ta ...[truncated 762 chars]
Remediation
## Remediation Suggestions - Invoke `confirm_risky_action "Global user tag assignment"` at the beginning of the `user-tag-set` branch. - Require `--yes` for non-interactive execution and require an exact interactive `YES` response otherwise, consistently with other consequential write operations. - Validate the documented tag format locally before confirmation and submission, including length and permitted characters. - Display the proposed tag and target API host in the confirmation prompt so the user can verify the irreversible value. - Keep server-side authentication, format validation, and one-time assignment enforcement in place; client-side confirmation must supplement rather than replace server-side controls. - Add regression tests verifying that invocation without `--yes` fails in non-interactive mode and that an interactive rejection sends no request.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (54)

Credential Access

High
Category
Privilege Escalation
Content
*.zip
*.env
publish/
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description understates the real capability set by omitting sensitive functions such as wallet import, swaps, approvals, webhook management, escrow operations, and trading features. This can mislead users or agent governance systems into granting the skill in contexts where they would not approve the full risk surface, especially because many of these actions move funds or alter account state.

External Script Fetching

High
Category
Supply Chain
Content
optional_env_vars:
    - AGENTWALLETAPI_URL
  required_binaries:
    - curl
  optional_binaries:
    - jq
---
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Natural-Language Policy Violations

High
Confidence
97% confidence
Finding
The skill explicitly instructs agents to stop re-confirming future write actions after a one-time onboarding approval. For financial operations, this weakens transaction-level consent and makes prompt injection, ambiguous follow-up instructions, or session confusion much more likely to result in unauthorized transfers, swaps, approvals, or other irreversible actions.

Credential Access

High
Category
Privilege Escalation
Content
bash scripts/agentwalletapi.sh create "Ops Wallet" sepolia WALLET_EXPORT_PASSPHRASE_OPS --yes
bash scripts/agentwalletapi.sh import "Treasury Imported" mainnet --yes
bash scripts/agentwalletapi.sh import "Poly Ops" polygon-mainnet --yes
# Automation-safe import: read private key from stdin instead of command args
printf '%s' '<private_key>' | bash scripts/agentwalletapi.sh import "Treasury Imported" mainnet - --yes
bash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 0.01 --yes
bash scripts/agentwalletapi.sh transfer Q7X2K9P 0xRecipient 100 USDC --yes
Confidence
90% confidence
Finding
The skill includes a wallet import flow involving private keys, including automation examples that pipe a raw private key into a shell command. Even though stdin is safer than command-line arguments, enabling agents to handle raw private keys substantially raises the risk of accidental logging, history leakage, misuse, or prompt-induced key import into the wrong destination.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- `POST /api/agent/checkout/escrows/:id/release` - Release funds
   - `POST /api/agent/checkout/escrows/:id/refund` - Refund funds
   - `POST /api/agent/checkout/escrows/:id/cancel` - Cancel escrow
   - `GET|POST /api/agent/checkout/webhooks` and `PATCH|DELETE /api/agent/checkout/webhooks/:id` - Manage webhooks

Checkout timing fields for `POST /api/agent/checkout/payreq`:
- `expiresInSeconds`: funding deadline before request expires.
Confidence
80% confidence
Finding
Webhook management endpoints allow creation, modification, and deletion of outbound integrations, which can be abused to redirect event data, suppress notifications, or tamper with downstream automations if an agent is manipulated. In this wallet/checkout context, webhook changes can affect financial workflows and leak sensitive operational metadata to attacker-controlled endpoints.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The skill metadata does not disclose that it supports wallet creation and private-key import, including transmission of private keys to the service for managed storage. In a crypto-wallet skill, omission of these highly sensitive capabilities is dangerous because users or automated governance may authorize it without understanding that it can create custodial assets or ingest secret key material.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
GET /api/agent/checkout/webhooks
POST /api/agent/checkout/webhooks
PATCH /api/agent/checkout/webhooks/:id
DELETE /api/agent/checkout/webhooks/:id
```

Subscribe and manage escrow event deliveries (`escrow.funded`, `escrow.released`, etc.).
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The script implements extensive Polymarket trading, order placement/cancellation, redeem, and account operations, but the manifest does not disclose prediction-market trading. Hidden trading capability is particularly risky in an agent context because it can trigger speculative financial actions beyond normal wallet administration, materially increasing loss potential and violating user expectations about tool scope.

Credential Access

High
Category
Privilege Escalation
Content
if [ -f "$ENV_FILE" ]; then
    source "$ENV_FILE"
elif [ "$ALLOW_PUBLIC_ONLY" -eq 0 ]; then
    echo "Error: .env file not found. Run setup first:"
    echo "  bash $SKILL_DIR/scripts/setup.sh"
    exit 1
fi
Confidence
93% confidence
Finding
The script sources the .env file directly as shell code rather than parsing key/value pairs safely. If an attacker can modify that file, they can execute arbitrary commands in the context of the user running the skill, and because this is a wallet-management tool, that context is especially sensitive.

Credential Access

High
Category
Privilege Escalation
Content
if [ -z "$LABEL" ] || [ -z "$NETWORK" ]; then
            echo "Usage: agentwalletapi.sh import <label> <network> [privateKey|-] [--yes]"
            echo "  network options: mainnet | polygon-mainnet | base-mainnet | solana-mainnet"
            echo "  pass '-' to read private key from stdin (recommended for automation)"
            exit 1
        fi
        if [ "$PRIVATE_KEY" = "-" ]; then
Confidence
80% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
#!/bin/bash
# OpenclawCash Skill Setup
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
#!/bin/bash
# OpenclawCash Skill Setup
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
#!/bin/bash
# OpenclawCash Skill Setup
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
#!/bin/bash
# OpenclawCash Skill Setup
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
#!/bin/bash
# OpenclawCash Skill Setup
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"

if [ -f "$ENV_FILE" ]; then
    echo "Found existing .env at $ENV_FILE"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# Creates the .env file for API key configuration

SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)"
ENV_FILE="$SKILL_DIR/.env"

if [ -f "$ENV_FILE" ]; then
    echo "Found existing .env at $ENV_FILE"
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The README markets substantially broader functionality than the stated skill description, including DEX swaps, escrow, trading, and gambling-related venue operations. That mismatch can mislead users, reviewers, or policy engines about the true privilege and risk surface of the skill, which is especially dangerous for an agent-integrated wallet tool capable of moving funds.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The README instructs users to execute an MCP server via `npx -y` without pinning a specific version or integrity-checked artifact. That creates a supply-chain risk: whoever controls the package or a compromised release can deliver new code at install time, and in this skill context that code may gain access to wallet API keys, transaction flows, and signing-related operations.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill exposes shell-based execution pathways but does not declare a restrictive tool scope such as allowed tools or permissions. In an agent environment, that increases the chance the model can invoke broader shell capabilities than intended, which is especially risky for a wallet skill that can perform financial writes and handle secrets.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The skill recommends running an MCP server via unpinned `npx -y @openclawcash/mcp-server`, which pulls the latest package at execution time. That creates a supply-chain risk: a compromised package, malicious update, or dependency takeover could give an agent immediate code execution in a highly privileged financial context.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The install metadata instructs agents to execute `npx -y @openclawcash/mcp-server` without pinning a specific package version or integrity value. That creates a supply-chain risk: whoever controls the published package or a compromised dependency can ship different code later, and agents may execute it with `AGENTWALLETAPI_KEY` present in the environment, enabling credential theft or unauthorized wallet actions.

Skill Enumeration

Medium
Category
Agent Snooping
Content
"steps": [
      "Preferred: run `npx -y @openclawcash/mcp-server` if this client supports MCP servers (requires AGENTWALLETAPI_KEY in the environment); skip the remaining steps if so",
      "Fallback only, when MCP is unavailable: git clone https://github.com/openclawcash/agentwalletapi <your-workspace>/skills/agentwalletapi",
      "Read <your-workspace>/skills/agentwalletapi/SKILL.md before running any command from the cloned skill"
    ],
    "agentPrompt": "Prefer MCP: if this client supports MCP servers, run \"npx -y @openclawcash/mcp-server\" (requires AGENTWALLETAPI_KEY in the environment) and stop there. Only if MCP is unavailable, git clone https://github.com/openclawcash/agentwalletapi into <your-workspace>/skills/agentwalletapi, then read <your-workspace>/skills/agentwalletapi/SKILL.md before running anything inside it."
  }
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
"steps": [
      "Preferred: run `npx -y @openclawcash/mcp-server` if this client supports MCP servers (requires AGENTWALLETAPI_KEY in the environment); skip the remaining steps if so",
      "Fallback only, when MCP is unavailable: git clone https://github.com/openclawcash/agentwalletapi <your-workspace>/skills/agentwalletapi",
      "Read <your-workspace>/skills/agentwalletapi/SKILL.md before running any command from the cloned skill"
    ],
    "agentPrompt": "Prefer MCP: if this client supports MCP servers, run \"npx -y @openclawcash/mcp-server\" (requires AGENTWALLETAPI_KEY in the environment) and stop there. Only if MCP is unavailable, git clone https://github.com/openclawcash/agentwalletapi into <your-workspace>/skills/agentwalletapi, then read <your-workspace>/skills/agentwalletapi/SKILL.md before running anything inside it."
  }
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.