Back to skill

Security audit

Openclaw Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for market analytics and trading, but it can place or cancel real orders without a local confirmation step or strong client-side safeguards.

Review this carefully before installing. Use a small, revocable, least-privilege prob.trade key if available, avoid storing live trading secrets in a shared or backed-up directory, and do not let an agent run order or cancel commands without your explicit review of market, side, amount, price, and order ID.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
lib/api_client.py:31
Finding
Trading Credentials Are Unnecessarily Sent to Public Analytics Endpoints<![CDATA[ ## Vulnerability Details **File Location**: `lib/api_client.py:31-38` **Vulnerability Type**: Violation of least privilege through unnecessary credential transmission **Risk Level**: Medium ### Vulnerable Code ```python # Public API requires authentication — sign with PTK key if available config = _load_config() if config.get("api_key") and config.get("api_secret"): path = f"/api/public{endpoint}" auth_headers = _sign(config["api_secret"], "GET", path) req.add_header("X-PTK-Key", config["api_key"]) for k, v in auth_headers.items(): req.add_header(k, v) ``` This behavior conflicts with the declaration in `README.md:99` that the Public Analytics API requires no authentication: ```markdown - **Public Analytics API** (no auth): [api.prob.trade/api/public](https://api.prob.trade/api/public/overview) — markets, stats, traders ``` ### Technical Analysis Every analytics request made through `fetch()` loads the configured API credentials. If both values are present, the client sends the API key in the `X-PTK-Key` header and an HMAC authentication proof in the `X-PTK-Signature` header. The API secret itself is not transmitted. It is used locally to generate an HMAC-SHA256 signature, and requests are restricted to the fixed HTTPS host `api.prob.trade`. Consequently, this is not evidence of deliberate secret exfiltration. However, the project documentation identifies these analytics endpoints as public and unauthenticated. Sending credentials on these requests therefore exceeds the minimum privileges required for analytics functionality. It exposes the API key and signed authentication material to additional endpoint handlers, server logs, monitoring infrastructure, TLS-inspection systems, and any compromised component servicing public analytics requests. Whether a captured signature can be replayed depends on server-side timestamp validation, replay prevention, and the scope assigned to the API key. ...[truncated 1431 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not load or attach credentials in `fetch()` when public analytics endpoints are genuinely unauthenticated. 2. Restrict credential handling to `trading_request()` and other endpoints that explicitly require authentication. 3. If analytics authentication is mandatory, correct all conflicting documentation and use a separate read-only analytics credential without trading authority. 4. Scope trading keys to the minimum supported permissions and prevent them from being accepted by unrelated public endpoint handlers. 5. Enforce short signature-validity windows and server-side replay prevention, such as nonce tracking. 6. Ensure API gateways, proxies, and application logs redact `X-PTK-Key`, `X-PTK-Signature`, and `X-PTK-Timestamp`. 7. Document exactly which authentication fields leave the machine and which endpoint classes receive them. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/probtrade.py:127
Finding
Financial Orders Lack Local Bounds and Semantic Validation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/probtrade.py:127-141` and `scripts/probtrade.py:218-221` **Vulnerability Type**: Insufficient validation of security-sensitive financial transaction parameters **Risk Level**: Low ### Vulnerable Code ```python def cmd_order(args): body = { "market": args.market, "side": args.side.upper(), "outcome": args.outcome, "type": args.type.upper(), "amount": args.amount, } if args.type.upper() == "LIMIT": if args.price is None: print("Error: --price is required for LIMIT orders", file=sys.stderr) sys.exit(1) body["price"] = args.price data = trading_request("POST", "/order", body) print(json.dumps(data, indent=2)) ``` The argument declarations describe expected values but do not enforce all of them: ```python sub.add_argument("--outcome", required=True, help="Yes or No") sub.add_argument("--type", required=True, choices=["MARKET", "LIMIT", "market", "limit"]) sub.add_argument("--price", type=float, help="Price for LIMIT orders (0.01-0.99)") sub.add_argument("--amount", type=float, required=True, help="Amount in USDC") ``` ### Technical Analysis The order command signs and submits user- or agent-provided financial parameters without sufficient local validation: - `--outcome` accepts arbitrary text despite being described as “Yes or No.” - `--price` is documented as limited to `0.01-0.99`, but that range is not enforced. - `--amount` accepts zero, negative, non-finite, or unexpectedly large floating-point values. - No local maximum order size or explicit confirmation mechanism protects against accidental high-value transactions. The remote service may reject malformed values, but relying exclusively on remote validation is not an adequate client-side safety boundary for an agent-accessible financial action. If the service accepts edge cases or interprets malformed values unexpectedly, the ...[truncated 1218 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict `--outcome` with explicit choices, such as `Yes`, `No`, and any other outcomes formally supported by the API. 2. Reject non-finite numbers using `math.isfinite()`. 3. Require `amount > 0` and define a documented maximum order amount. 4. Enforce the documented limit-price range of `0.01` through `0.99`. 5. Reject `--price` for market orders to prevent ambiguous input. 6. Prefer decimal arithmetic over binary floating-point for monetary amounts and prices. 7. Add an explicit confirmation or dry-run step for financial actions, especially orders over a configurable threshold. 8. Retain equivalent server-side validation because client-side controls can be bypassed. 9. Return structured validation errors without transmitting an invalid signed request. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The README encourages broad natural-language use such as buying, cancelling, and querying positions without describing confirmation gates or requiring explicit command syntax for sensitive actions. In an agent setting, this can lead to unintended activation or misinterpretation of user intent, especially for trading actions tied to real funds.

Session Persistence

Medium
Category
Rogue Agent
Content
### Setup

1. Go to [app.prob.trade](https://app.prob.trade) and create an account
2. Navigate to Settings and generate an API key
3. Configure the skill:
Confidence
72% confidence
Finding
The setup instructions tell users to store long-lived API credentials in a local config file under the skill directory, which creates a persistent secret on disk. If filesystem permissions, backups, logs, or other local components are compromised, the key could be recovered and used to place trades or access account data.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The trading section describes real-money buy, sell, and cancel operations but does not clearly warn that these actions can affect live funds and may be irreversible once executed. In an autonomous or semi-autonomous agent environment, omission of such warnings increases the chance that users trigger financially impactful actions without appreciating the risk.

External Transmission

Medium
Category
Data Exfiltration
Content
## API

- **Public Analytics API** (no auth): [api.prob.trade/api/public](https://api.prob.trade/api/public/overview) — markets, stats, traders
- **Trading API** (API key + HMAC): [api.prob.trade/api/trading](https://api.prob.trade/api/trading) — orders, positions, balance

## Links
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## API

- **Public Analytics API** (no auth): [api.prob.trade/api/public](https://api.prob.trade/api/public/overview) — markets, stats, traders
- **Trading API** (API key + HMAC): [api.prob.trade/api/trading](https://api.prob.trade/api/trading) — orders, positions, balance

## Links
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
## API

- **Public Analytics API** (no auth): [api.prob.trade/api/public](https://api.prob.trade/api/public/overview) — markets, stats, traders
- **Trading API** (API key + HMAC): [api.prob.trade/api/trading](https://api.prob.trade/api/trading) — orders, positions, balance

## Links
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill declares required environment variables, local config file access, and network use, but does not explicitly scope or constrain those capabilities with permissions or allowed-tools metadata. In an agent context, this weakens least-privilege controls and makes it easier for the skill to access secrets and perform external requests without clear policy boundaries.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documents live trading and order-cancellation commands but does not clearly warn that these actions can execute real financial transactions. In an AI-agent workflow, users or downstream agents may invoke these commands as if they were read-only analytics, causing unintended trades, losses, or cancellation of active orders.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill exposes live trading operations (`order` and `cancel`) that execute immediately once invoked, with no confirmation prompt, dry-run mode, or secondary approval step. In a tool designed for financial trading, this increases the risk of accidental or manipulated order placement/cancellation through user error, prompt injection in higher-level agents, or misuse of delegated automation.

Static analysis

No suspicious patterns detected.