Back to skill

Security audit

blave-quant

Security checks for vulnerabilities and agentic risk

Overview

The skill documents legitimate market-data and crypto-trading workflows, but it also tells agents to download marketplace strategy code and run it locally, which creates a serious review concern.

Install only if you understand this can control real exchange accounts. Use separate least-privilege API keys, disable withdrawals unless absolutely needed, enable IP allowlisting, and do not run marketplace, shared, or purchased strategies except inside a sandbox with no inherited secrets or broad filesystem access.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
references/marketplace.md:27
Finding
Mutable Marketplace Strategies Are Downloaded and Executed as Local Python<![CDATA[ ## Vulnerability Details **File Location**: `references/marketplace.md:27-40` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```text Fetch strategy code (requires purchase): ``` GET /openclaw/marketplace/strategies/{id}/code ``` Response: `{"code": "..."}` — save to `.py` and run with `python3`. **Flow when user wants to run a purchased strategy:** 1. `GET /openclaw/marketplace/my/purchases` — show the list 2. User picks one → `GET /openclaw/marketplace/strategies/{id}/code` 3. Save to `/tmp/<filename>.py` 4. **Check for multi-strategy bundle** — scan for `# ===== STRATEGY \d+:` markers: - If found: split into separate files and deploy each (see "Multi-strategy bundle" below) - If not found: `python3 filename.py` ``` Related instructions at `references/marketplace.md:92-100` state that downloaded bundles are moved into a strategy directory and executed, while private strategies are not reviewed: ```text **Deploying** — when downloaded code contains `# ===== STRATEGY N:` markers: 1. Split at each marker into N separate strings 2. Save each to `/tmp/<name_slug>.py` (slug from the name after the colon) 3. Security scan each file separately; skip any that exit 2 (critical) 4. Move approved files to `strategies/<name_slug>.py` and run each with `python3` ## Private strategies Upload a private strategy (no review, immediately accessible): ``` ### Technical Analysis The Skill establishes an explicit code-execution channel from the mutable Blave marketplace API to the local Python interpreter. Marketplace content is not part of the audited Skill artifact and can change after this Skill has been reviewed. The ordinary single-strategy path directs the agent to execute the downloaded file without any security review. The bundle path mentions a security scan, but does not define the scanner, its trust boundary, its coverage, or a sandbox. Treating one scanner exit status as sufficient a ...[truncated 2354 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove all instructions that directly execute marketplace responses with `python3`. 2. Require each strategy release to be signed by a verified publisher and identified by an immutable cryptographic digest. 3. Verify the signature and digest locally before storing or evaluating the strategy. 4. Display the publisher identity, source version, digest, requested capabilities, and complete source diff to the user before execution. 5. Require a separate, explicit user confirmation for executing each exact strategy digest. Approval of one digest must not authorize later versions. 6. Apply a defined security review to every strategy, including ordinary files, bundles, updates, and private shares. 7. Run approved strategies in an isolated container or sandbox with: - No inherited environment variables. - No access to `.env`, SSH material, home directories, or agent configuration. - A read-only filesystem except for a dedicated temporary working directory. - No host process or shell access. - No outbound network access by default. - Explicit destination allowlists when network access is necessary. - CPU, memory, process, and execution-time limits. 8. Provide exchange access through a constrained broker interface rather than exposing raw API credentials to strategy processes. 9. Use read-only or paper-trading credentials by default and require separate authorization for live trading. 10. Treat private and shared strategies as untrusted even when the sender appears known. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:32
Finding
Unpinned Unattended Installation Executes Mutable Supply-Chain Components<![CDATA[ ## Vulnerability Details **File Location**: `README.md:32-43` **Vulnerability Type**: Insecure dependency and update process **Risk Level**: Medium ### Vulnerable Code ```bash npx -y skills add https://github.com/Blave-TW/blave-quant-skill -a openclaw -s blave-quant -y ``` The update procedure repeats the same mutable installation command: ```text Run the same install command again — it overwrites the existing skill in place. ```bash npx -y skills add https://github.com/Blave-TW/blave-quant-skill -a openclaw -s blave-quant -y ``` ``` ### Technical Analysis The command invokes `npx` without specifying a version for the `skills` package. This permits package resolution to select a newer release than the one previously reviewed. The `-y` option suppresses the installation prompt, reducing the opportunity to review what will be executed. The Skill source is also referenced through an unpinned GitHub repository URL rather than an immutable commit identifier or verified release artifact. The documented update process overwrites the installed Skill using the same mutable sources without requiring a diff or integrity check. This creates two independent mutable supply-chain inputs: 1. The package executed by `npx`. 2. The GitHub repository content installed by that package. Compromise of either publishing channel, maintainer account, or upstream release process could introduce malicious installation behavior or replace trusted Skill instructions. ### Attack Path 1. An attacker compromises the npm package, its publisher account, the GitHub repository, or a maintainer credential. 2. The attacker publishes a malicious package version or modifies the repository's current branch. 3. A user or agent runs the documented installation or update command. 4. `npx -y` resolves and executes the unpinned package without an interactive approval step. 5. The installer retrieves the mutable repository state and overwrites the existing Skill. 6. The compromised pa ...[truncated 843 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the executable npm package to a reviewed exact version, for example `skills@<exact-version>`. 2. Pin the Skill source to an immutable Git commit or signed release tag rather than the repository's mutable default branch. 3. Publish and verify SHA-256 checksums for release artifacts. 4. Prefer signed release artifacts and verify signatures against a documented maintainer key. 5. Remove unattended `-y` behavior where practical, especially for updates. 6. Resolve and download the package without executing it, inspect its contents, and only then run a reviewed installer. 7. Before updates, show a diff of all changed Skill files and require explicit approval. 8. Prevent updates from silently overwriting the currently installed version; retain a rollback copy. 9. Use a restricted installation environment with no exchange credentials and minimal filesystem permissions. 10. Document the exact reviewed package version, repository commit, expected checksums, and verification procedure. ]]>
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (144)

YARA rule 'ransomware_behavior': Ransomware-like patterns (mass encryption, ransom notes) [malware]

Critical
Category
YARA Match
Content
resp.ok:
        raise RuntimeError(f"{resp.status_code} {resp.text}")
    return resp.json()
```

**Common mistakes:**
- Signing `/spot/orders` instead of `/api/v4/spot/orders` — the `/api/v4` prefix is part of the signed path
- Using milliseconds for `Timestamp` — Gate.io uses **seconds**
- Hashing a re-serialized body that differs from the bytes actually sent — sign the exact string you send
- Query string must match exactly what is sent (unencoded form, e.g. `currency_pair=BTC_USDT&limit=10`)

## Spot

| Operation | Method | Path | Auth |
|---|---|---|---|
| Ticker | GET | `/spot/tickers?currency_pair=BTC_USDT` | public |
| Order book | GET | `/spot/order_book?currency_pair=BTC_USDT` | public |
| Candlesticks | GET | `/spot/candlesticks?currency_pair=BTC_USDT&interval=1h` | public |
| Balances | GET | `/spot/accounts` | signed |
| Create order | POST | `/spot/orders` | signed |
| Batch orders | POST | `/spot/batch_orders` | signed |
| List orders | GET | `/spot/orders?curren
Confidence
80% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Description-Behavior Mismatch

Critical
Confidence
99% confidence
Finding
The file explicitly instructs users to fetch remote code, save it locally, and execute it with python3. That is a direct remote code execution workflow, and because the code originates from purchased marketplace content, it enables execution of untrusted or insufficiently reviewed code with the user's local privileges.

Context-Inappropriate Capability

Critical
Confidence
99% confidence
Finding
Arbitrary remote Python code execution is unjustified by the stated purpose of the skill, which is market data access and trading operations. In this context, the capability is especially dangerous because the same environment may also hold exchange API keys and account access, allowing malicious strategy code to steal secrets, place trades, exfiltrate data, or tamper with local files.

Description-Behavior Mismatch

Critical
Confidence
99% confidence
Finding
The multi-strategy bundle flow increases the attack surface by normalizing splitting, persisting, approving, and executing multiple remote Python files. Scanning each file separately is not a sufficient control because malicious behavior can be obfuscated, split across files, or triggered only at runtime after deployment.

Missing User Warnings

High
Confidence
98% confidence
Finding
This is a true vulnerability in the skill specification: the document advertises many exchange integrations capable of placing live orders, changing leverage, transferring funds, and managing positions, but it does not prominently warn users that the skill can execute real authenticated trading actions. In a trading skill, that omission is especially dangerous because a user may reasonably interpret it as informational/analytical only, leading to unintended irreversible financial transactions across third-party exchanges.

Credential Access

High
Category
Privilege Escalation
Content
When the user wants to trade, **ask which exchange** if not specified, then **read the corresponding reference file** for full auth, endpoints, and operation flow.

| Exchange | .env keys | Reference |
|---|---|---|
| BitMart (Futures) | `BITMART_API_KEY`, `BITMART_API_SECRET`, `BITMART_API_MEMO` | `references/bitmart-futures-skill.md` |
| BitMart (Spot) | same as above | `references/bitmart-spot-skill.md` |
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
`quantity` or `closePosition=true`/`workingType`
- Response: `algoId` (int, keep as string) + `algoStatus` (NEW/TRIGGERED/CANCELED/EXPIRED)
- Conditional orders do NOT appear in `GET /fapi/v1/openOrders` — query
  `GET /fapi/v1/openAlgoOrders`; cancel one via `DELETE /fapi/v1/algoOrder`
  (`algoId` or `clientAlgoId`); cancel all via `DELETE /fapi/v1/algoOpenOrders?symbol=`
  (`DELETE /fapi/v1/allOpenOrders` only clears regular orders)
Confidence
88% confidence
Finding
The documented cancellation path allows cancellation of algo orders by `algoId` or `clientAlgoId`, which are highly sensitive action parameters. In an agent context, if those identifiers are inferred, reused, or insufficiently bound to user intent and symbol/account context, the tool can be abused to cancel protective stop or take-profit orders and expose positions to major loss.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- Response: `algoId` (int, keep as string) + `algoStatus` (NEW/TRIGGERED/CANCELED/EXPIRED)
- Conditional orders do NOT appear in `GET /fapi/v1/openOrders` — query
  `GET /fapi/v1/openAlgoOrders`; cancel one via `DELETE /fapi/v1/algoOrder`
  (`algoId` or `clientAlgoId`); cancel all via `DELETE /fapi/v1/algoOpenOrders?symbol=`
  (`DELETE /fapi/v1/allOpenOrders` only clears regular orders)

**Futures order params:** `symbol`, `side` (BUY/SELL), `positionSide` (BOTH/LONG/SHORT), `type` (LIMIT/MARKET/STOP/STOP_MARKET/TAKE_PROFIT/TAKE_PROFIT_MARKET/TRAILING_STOP_MARKET), `quantity`, `price`, `stopPrice`, `timeInForce`, `reduceOnly`, **`newClientOrderId` (REQUIRED: must start with `x-52DDFAFN`, ≤36 chars)**
Confidence
94% confidence
Finding
The `DELETE /fapi/v1/algoOpenOrders?symbol=` endpoint enables bulk cancellation of all open algo orders for a symbol, creating a high-risk footgun if an agent supplies the wrong symbol or acts without explicit approval. Removing all conditional orders can strip stop-loss and take-profit protection across active positions, rapidly increasing liquidation or loss risk.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- Conditional orders do NOT appear in `GET /fapi/v1/openOrders` — query
  `GET /fapi/v1/openAlgoOrders`; cancel one via `DELETE /fapi/v1/algoOrder`
  (`algoId` or `clientAlgoId`); cancel all via `DELETE /fapi/v1/algoOpenOrders?symbol=`
  (`DELETE /fapi/v1/allOpenOrders` only clears regular orders)

**Futures order params:** `symbol`, `side` (BUY/SELL), `positionSide` (BOTH/LONG/SHORT), `type` (LIMIT/MARKET/STOP/STOP_MARKET/TAKE_PROFIT/TAKE_PROFIT_MARKET/TRAILING_STOP_MARKET), `quantity`, `price`, `stopPrice`, `timeInForce`, `reduceOnly`, **`newClientOrderId` (REQUIRED: must start with `x-52DDFAFN`, ≤36 chars)**
Confidence
95% confidence
Finding
`DELETE /fapi/v1/allOpenOrders` is an especially dangerous bulk action because it can wipe all regular open orders for a symbol in one call, including entries, exits, and risk-management legs. In a trading skill with live credentials, improper parameter handling or unintended invocation can immediately alter trading posture and cause financial harm.

Missing User Warnings

High
Confidence
98% confidence
Finding
The documentation provides ready-to-run production curl examples for signed trading and transfer operations without prominent warnings that they can place live orders, alter leverage/mode, or move funds. In an agent skill context, such examples materially raise the chance of accidental real-money actions because an LLM or user may copy or adapt them without appreciating that they target production endpoints.

External Script Fetching

High
Category
Supply Chain
Content
### KEYED Verification (simplest)

```bash
curl -s -H "X-BM-KEY: $BITMART_API_KEY" \
  -H "User-Agent: bitmart-skills/spot/v2026.3.23" \
  -H "X-BM-BROKER-ID: BlaveData666666" \
  'https://api-cloud.bitmart.com/account/v1/wallet' | python3 -m json.tool
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
TIMESTAMP=$(date +%s000)
BODY='{}'
SIGN=$(echo -n "${TIMESTAMP}#${BITMART_API_MEMO}#${BODY}" | openssl dgst -sha256 -hmac "$BITMART_API_SECRET" | awk '{print $NF}')
curl -s -X POST 'https://api-cloud.bitmart.com/spot/v4/query/open-orders' \
  -H "User-Agent: bitmart-skills/spot/v2026.3.23" \
  -H "X-BM-BROKER-ID: BlaveData666666" \
  -H "Content-Type: application/json" \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The document includes BitMart isolated-margin borrowing, margin order placement, and repayment flows even though the skill metadata says BitMart support is limited to spot trading. That scope mismatch can cause an agent to perform higher-risk leveraged actions the user and platform may not have authorized, materially increasing financial and policy risk.

Credential Access

High
Category
Privilege Escalation
Content
import requests
from dotenv import dotenv_values

env = dotenv_values(".env")
API_KEY        = env["KUCOIN_API_KEY"]
API_SECRET     = env["KUCOIN_API_SECRET"]
API_PASSPHRASE = env["KUCOIN_API_PASSPHRASE"]
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Description-Behavior Mismatch

High
Confidence
95% confidence
Finding
This documentation introduces a strategy marketplace with upload, sharing, download, and execution workflows that materially expand the skill beyond its declared market-data and exchange-trading scope. That scope expansion is dangerous because it creates a path for untrusted third-party code to enter the environment under the guise of normal skill usage.

Missing User Warnings

High
Confidence
97% confidence
Finding
The documentation tells users to execute downloaded code without any explicit warning that it is remote code and may be dangerous. This omission increases the likelihood that users will treat third-party code as trusted and run it in privileged environments containing API keys, trading access, or sensitive files.

Missing User Warnings

High
Confidence
97% confidence
Finding
The documented run flow operationalizes unsafe behavior by giving step-by-step instructions to retrieve, store, and execute a purchased strategy. Clear operational instructions without corresponding risk disclosure make accidental unsafe execution more likely and normalize insecure handling of third-party code.

Context-Inappropriate Capability

High
Confidence
94% confidence
Finding
Submission, private sharing, and sale features create a software distribution channel inside a skill whose declared function is financial data/trading access. Even if intended as a product feature, it introduces a supply-chain risk where malicious or careless users can distribute harmful code that later appears trustworthy because it is hosted within the same ecosystem.

Missing User Warnings

High
Confidence
96% confidence
Finding
Moving downloaded files into a strategies directory and running them implies persistence and trusted deployment of third-party code, but the documentation gives no clear warning about the associated filesystem and execution risks. This can facilitate persistence, tampering with local strategy inventories, and later execution of malicious code that appears approved.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
Remove a user's access:
```
DELETE /openclaw/marketplace/strategies/{id}/share
Content-Type: application/json

{"user_id": 456}
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).

Missing User Warnings

High
Confidence
97% confidence
Finding
The private/shared strategy flow repeats the same unsafe pattern of downloading and executing remote code, but with an added social-trust vector because shared content may seem safer simply because it came from another user. That makes phishing, insider abuse, or malicious sharing particularly plausible.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This is a true vulnerability because the file enumerates numerous API keys and secrets for external services without any warning about secure handling, least-privilege scoping, or the fact that requests will transmit authenticated commands to third-party exchanges. In this context, the skill is not merely reading market data; it can submit orders and move assets, so poor credential hygiene materially raises the risk of account compromise, over-privileged access, and accidental exposure of highly sensitive secrets.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The README states the skill gives an agent only eight capabilities and lists Blave plus seven exchanges. However, the manifest scope also includes additional exchanges and datasets such as Gate.io, KuCoin, Bitfinex funding, CME/ICE futures, Taiwan futures, Taiwan stocks, broker-branch flows, and broader Taiwan market data. This creates a semantic mismatch between the documented scope and the skill's declared purpose.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The README instructs users to install and run a remote package via `npx -y skills` without pinning a version or integrity-checked source. This creates a supply-chain risk: a future malicious or compromised release of the `skills` package could execute arbitrary code during installation in the user's environment.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The update instructions again rely on `npx -y skills` without a pinned version, so every update implicitly trusts the latest published package. If that upstream package is compromised, users following the README may execute attacker-controlled code during update.

Static analysis

No suspicious patterns detected.