Back to skill

Security audit

OpenMM

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent trading skill, but it exposes live exchange trading and bulk cancellation authority without strong built-in confirmation controls.

Install only if you deliberately want an AI/OpenClaw integration that can access exchange account data and, when enabled, place or cancel real trades. Use dedicated exchange API keys with withdrawals disabled, narrow read/trade permissions, IP allowlisting, and small limits; keep destructive tools disabled unless needed, require human confirmation outside the model, and prefer pinned package versions or a lockfile-managed install.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
packages/plugins/openclaw-openmm/src/index.ts:133
Finding
State-Changing Trading Tools Do Not Enforce User Approval or Authorization## Vulnerability Details **File Location**: `packages/plugins/openclaw-openmm/src/index.ts`, lines 133-200 **Vulnerability Type**: Missing authorization and confirmation enforcement for financial operations **Risk Level**: High ### Vulnerable Code ```typescript // Create order (optional — requires explicit approval) api.registerTool( { name: "openmm_create_order", description: "Place a limit or market order. IMPORTANT: Always confirm with the user before executing.", parameters: Type.Object({ exchange: Type.String({ description: "Exchange id" }), symbol: Type.String({ description: "Trading pair, e.g. SNEK/USDT" }), side: Type.String({ description: "buy or sell" }), type: Type.String({ description: "limit or market" }), amount: Type.Number({ description: "Order amount in base currency" }), price: Type.Optional(Type.Number({ description: "Limit price (required for limit orders)" })), }), async execute( _id: string, params: { exchange: string; symbol: string; side: string; type: string; amount: number; price?: number }, ) { const args = [ "orders", "create", "--exchange", params.exchange, "--symbol", params.symbol, "--side", params.side, "--type", params.type, "--amount", String(params.amount), ]; if (params.price != null) args.push("--price", String(params.price)); return text(await openmm(args)); }, }, { optional: true }, ); // Cancel order (optional) api.registerTool( { name: "openmm_cancel_order", description: "Cancel a specific order by ID.", parameters: Type.Object({ exchange: Type.String({ description: "Exchange id" }), orderId: Type.String({ description: "Order ID to cancel" }), symbol: Type.String({ descript ...[truncated 4014 chars]
Remediation
## Remediation Suggestions 1. Enforce authorization in code for every state-changing tool. Validate the authenticated OpenClaw principal and restrict access to an explicit allowlist of users, channels, and roles. 2. Implement a two-phase transaction flow: - First generate a normalized order or cancellation preview. - Return a short-lived approval identifier bound to the user, exchange, symbol, side, type, amount, price, and expiration time. - Require a second authenticated call containing that identifier before execution. 3. Apply `requireAuth` or the equivalent framework authorization control to agent tools, not only chat commands. 4. Require fresh confirmation for any changed parameter. Do not accept a generic earlier statement such as “you may trade” as approval for later transactions. 5. Enforce server-side limits for permitted exchanges, symbols, order sizes, daily notional value, price deviation, and cancellation scope. 6. Do not allow `cancel-all` without an explicit symbol unless the user separately approves an account-wide cancellation. 7. Record immutable audit events containing the authenticated actor, originating channel, approved parameters, tool invocation ID, CLI result, and exchange order IDs. Redact all credentials. 8. Keep withdrawal permissions disabled and use dedicated API keys with the minimum read/trade permissions and IP restrictions. 9. Add automated tests proving that direct calls without a valid, unexpired approval token are rejected.

T08 · Insecure Dependencies

Error
Location
packages/plugins/openclaw-openmm/package.json:22
Finding
Unpinned Runtime Trading Dependency Creates a Credential-Bearing Supply-Chain Risk## Vulnerability Details **File Location**: `packages/plugins/openclaw-openmm/package.json`, lines 22-23 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```json "dependencies": { "@3rd-eye-labs/openmm": "latest", "@sinclair/typebox": "^0.34.0" } ``` Related execution code in `packages/plugins/openclaw-openmm/src/index.ts`, lines 1-14: ```typescript import { execFile } from "node:child_process"; import { promisify } from "node:util"; import { Type } from "@sinclair/typebox"; const exec = promisify(execFile); /** Run an openmm CLI command and return stdout. */ async function openmm(args: string[]): Promise<string> { const { stdout } = await exec("openmm", args); return stdout.trim(); } ``` The skill documentation also recommends executing an unpinned package through `npx`. For example, `SKILL.md`, lines 61-71, contains: ```text Run `npx @qbtlabs/openmm-mcp` to start a local MCP server over stdio. { "mcpServers": { "openmm": { "command": "npx", "args": ["@qbtlabs/openmm-mcp"], "env": { "MEXC_API_KEY": "your_key", "MEXC_SECRET": "your_secret" } } } } ``` ### Technical Analysis The version specifier `"latest"` makes installation results dependent on the mutable npm distribution tag at installation time. A package release or distribution-tag change after this repository was audited can therefore replace the effective `openmm` executable without any reviewed source change. This is more dangerous than an ordinary unpinned library dependency because the plugin launches an `openmm` executable for balance queries and state-changing trading operations. By default, `execFile` inherits the parent process environment when no explicit `env` option is supplied. Consequently, an executable selected from the runtime `PATH` may receive exchange API keys and secrets ...[truncated 2009 chars]
Remediation
## Remediation Suggestions 1. Replace `"latest"` with an exact reviewed version, for example `"@3rd-eye-labs/openmm": "x.y.z"`, and update it only through reviewed dependency-change pull requests. 2. Commit and enforce a lockfile with integrity hashes. Use `npm ci` in deployment and CI so resolution cannot drift. 3. Pin documented `npx` invocations to an exact version, such as `npx --yes @qbtlabs/openmm-mcp@x.y.z`, or install a verified artifact in advance and disable runtime package downloads. 4. Verify package provenance, signatures, npm attestations, publisher identities, and integrity before promotion to production. 5. Run dependency scanning and review package diffs, lifecycle scripts, executable entry points, and transitive dependency changes on every update. 6. Launch the CLI with a deliberately constructed environment rather than inheriting the entire parent environment. Pass only the credentials required for the selected exchange and remove unrelated secrets. 7. Resolve and validate the executable using a trusted absolute path. Ensure the executable is owned by the expected user or administrator and is not writable by less-privileged users. 8. Disable unnecessary npm lifecycle scripts during installation where compatible with the package. 9. Isolate the trading component in a restricted service account or container with minimal filesystem and network access. 10. Use exchange API keys with no withdrawal permission, strict IP allowlisting, narrow trading permissions, and rapid revocation capability.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (40)

Missing User Warnings

High
Confidence
97% confidence
Finding
The default grid trading example starts a live automated strategy rather than a simulation, and the warning about dry-run appears later rather than adjacent to the dangerous command. In a skill whose purpose is automated multi-exchange trading, this is especially risky because it can place and continuously recreate orders until manually stopped, causing sustained financial loss from misconfiguration or unintended execution.

Missing User Warnings

High
Confidence
98% confidence
Finding
The grid trading section documents an automated strategy that can continuously place and recreate live orders, but it does not clearly warn that omitting `--dry-run` enables real trading on the connected exchange account. Because this is automation rather than a one-off order, the potential for repeated unintended trades, rapid fund deployment, and cascading losses is materially higher.

Skill Enumeration

Medium
Category
Agent Snooping
Content
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
```
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```
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
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```

---
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
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```

---
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
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/exchange-setup/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/grid-trading/SKILL.md
https://raw.githubusercontent.com/QBT-Labs/OpenMM-ai/main/skills/portfolio/SKILL.md
```

---
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.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The README explicitly promotes configuring exchange API credentials via environment variables, but this top-level documentation does not clearly warn users about secret handling risks such as committing .env files, exposing variables in shell history, CI logs, crash dumps, or giving overly broad trading/withdrawal permissions. In a trading skill context, these credentials can directly enable account takeover of exchange automation or unauthorized trades, so missing prominent handling guidance is a real security weakness in operator-facing documentation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs users to launch an MCP server with `npx @qbtlabs/openmm-mcp` without pinning a specific package version or integrity. Because this skill is explicitly designed to handle exchange API credentials and trading operations, an upstream package change or compromise could execute attacker-controlled code locally and gain access to secrets or place trades.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
These examples show live order creation and cancellation commands in a trading skill without an adjacent, explicit warning that they act on real exchange accounts when credentials are present. In this context, copy-pasting by users or AI agents can immediately trigger irreversible financial actions, especially because the same document also teaches how to configure real API keys.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
For AI agents using MCP:
1. **Always show the trade plan** — display what will be executed
2. **Get explicit confirmation** — never auto-execute without user approval
3. **Use `dryRun: true`** — the MCP `start_grid_strategy` tool defaults to dry-run mode

### Risk management
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The command triggers include very generic words such as "balance", "price", "orders", and especially "cancel-all", which can overlap with normal conversational language in chat-driven environments like Telegram. In a trading skill with order-management capabilities, ambiguous triggers increase the risk of accidental invocation of sensitive actions, including viewing account data or canceling live orders, if the hosting agent auto-routes messages to commands.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The optional order-cancellation tools expose destructive trading actions directly to the agent with no enforced confirmation, approval token, or runtime safeguard. In an agent context, a prompt-injected or mistaken model action could cancel live orders or stop an active strategy, causing immediate financial loss, missed fills, or disruption of automated trading.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The /cancel-all command performs a bulk destructive trading operation immediately after parsing chat arguments, with no confirmation prompt or secondary check beyond requireAuth. If a user, compromised session, or prompt-driven workflow invokes it accidentally or maliciously, all open orders may be removed at once, disrupting strategy execution and potentially causing significant trading losses.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README tells users to export exchange API credentials directly into their shell environment but provides no warning about secure handling, least-privilege API scopes, or the risk of exposing trading-capable secrets through shell history, shared terminals, logs, or misconfigured environments. In a crypto/market-data context, API keys can expose balances and in some exchanges may enable broader account access if users reuse existing keys with trading or withdrawal permissions.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The skill explicitly instructs users to configure exchange API credentials and then query sensitive account data such as balances and open orders, but it provides no warning about the sensitivity of these secrets or the privacy implications of exposing account information to the tool or downstream logs. In an agent setting, this increases the risk of credential leakage, overbroad secret exposure, or unintended disclosure of portfolio data through prompts, terminal history, telemetry, or MCP integrations.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The README explicitly tells users to begin live automated trading after only a dry-run example, but it does not present any financial risk warning, sandbox recommendation, position-sizing caution, or guidance to use restricted API keys. In a trading plugin, this omission is safety-relevant because users may execute real orders with real funds immediately, increasing the likelihood of preventable financial loss from misconfiguration, strategy misuse, or misunderstood defaults.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Conservative: 0.8 (80%)
- Useful when price sources may be unreliable

### Never Auto-Execute

- Always show the trade plan before execution
- Always get explicit user confirmation
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This documentation includes commands that create, cancel, and cancel all live exchange orders without prominent warnings that they are financially consequential and can immediately affect real user funds or trading positions. In an agent skill context, users may copy commands directly or an agent may surface them as suggested actions, increasing the chance of unintended destructive trading activity.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
This reference documents tools that can place, cancel, and manage live exchange orders without clearly warning users that these actions may affect real funds on connected accounts. In an AI-agent and MCP context, the absence of prominent live-trading risk and confirmation guidance increases the chance of unintended or automated execution against production accounts.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
packages/plugins/openclaw-openmm/src/index.ts:13