Back to skill

Security audit

Openclaw Skill Publish

Security checks for vulnerabilities and agentic risk

Overview

This skill is disclosed as a trading tool, but it can place or cancel live orders using persistent API credentials without strong confirmation safeguards.

Review this before installing if you connect live prob.trade credentials. Use a limited or revocable key if available, prefer environment variables or locked-down file permissions, and do not let an agent execute order or cancel commands without explicit user confirmation and amount/market checks.

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
lib/api_client.py:31
Finding

Unnecessary API Key Disclosure on Public Analytics Requests

Content
View full analysis

Vulnerability Details

File Location: lib/api_client.py:31-38
Vulnerability Type: Unnecessary transmission of sensitive authentication material
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)

Technical Analysis

The public analytics request function automatically loads trading credentials and sends the API key, timestamp, and HMAC signature to https://api.prob.trade whenever credentials are configured.

This behavior conflicts with README.md:99, which identifies the Public Analytics API as requiring no authentication, and with scripts/probtrade.py:5, which describes analytics commands as unauthenticated. On the available evidence, attaching trading authentication material to public analytics requests is unnecessary and violates least-data and least-privilege principles.

The API secret itself is not transmitted: it is used locally to calculate an HMAC-SHA256 signature. HTTPS also protects the request in transit under normal certificate validation. Nevertheless, the API key and derived authentication metadata become available to the remote analytics service and potentially its request logs, proxies, monitoring systems, and compromised server-side components.

Attack Path

  1. A user configures PROBTRADE_API_KEY and PROBTRADE_API_SECRET, or stores them in the supported configuration file.
  2. The user invokes an analytics-only command such as overview, hot, search, or stats.
  3. fetch() calls _load_config() despite the endpoint being documented as public.
  4. The function places the API key in the X-PTK-Key head ...[truncated 1237 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove credential loading and authentication headers from fetch() when accessing documented public analytics endpoints.
  2. Restrict _load_config(), HMAC signing, and X-PTK-Key transmission to trading_request().
  3. If analytics authentication is actually required, update all conflicting documentation and use a separate read-only analytics credential with no trading permissions.
  4. Implement explicit endpoint-level authentication policy rather than opportunistically attaching credentials whenever they are present.
  5. Ensure server-side request logs redact X-PTK-Key, X-PTK-Signature, and related authentication headers.
  6. Enforce short timestamp tolerances and replay detection for signed requests.
  7. Scope keys to the minimum required operations and support immediate rotation and revocation.
  8. Add automated tests confirming that public analytics requests never contain authentication headers.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README encourages broad natural-language activation for market analysis requests without clear trigger boundaries or confirmation requirements. In an agent environment, this can cause overbroad invocation on loosely related prompts and unintended external API calls, especially when users ask general finance or market questions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
74% confidence
Finding

The setup instructions direct users to persist live API credentials in a local YAML config file under the skill directory, which can increase exposure through accidental file disclosure, weak filesystem permissions, backups, logs, or agent/plugin access. While this is common operational guidance, storing long-lived secrets in plaintext is a real security weakness.

Content

Scanner excerpt · README.md (reported line 59)May include surrounding context.

md
### 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:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language trading examples include high-risk actions such as buying and cancelling orders using broad phrasing, without explicit safeguards like confirmation, parameter validation, position/risk checks, or exclusions for ambiguous requests. In an autonomous agent context, this materially increases the chance of unintended financial transactions from casual or misinterpreted user messages.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 99)May include surrounding context.

md
## 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

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 100)May include surrounding context.

md
## 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

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
## 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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares code-relevant capabilities via metadata and documented commands that require environment secrets, local config reads, and network access, but it does not explicitly scope or restrict allowed tools/permissions. In an agent setting, that increases the chance the runtime grants broader-than-necessary access, enabling unintended secret exposure or networked actions beyond the user's expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill exposes live trading actions like placing and canceling orders without an explicit warning that these actions can cause real financial loss and may be difficult or impossible to reverse once executed. In a user-invocable agent context, this omission materially raises the risk of accidental or misunderstood execution of real-money trades.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file implements authenticated trading capabilities, including signed requests using API keys and secrets, while the skill description emphasizes analytics and market information. In an agent setting, adding order-capable functionality materially increases risk because a user or downstream tool may invoke real trading actions with configured credentials, causing unauthorized or unintended financial transactions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill exposes live trading actions that place and cancel real orders, but the CLI help text and command flow do not provide an explicit high-visibility warning, dry-run mode, or confirmation step before destructive financial actions. In an agent or automation context, this increases the risk of accidental or prompt-induced trades, especially because the same tool mixes harmless analytics with state-changing operations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.