Back to skill

Security audit

Openclaw Quant Skill

Security checks for vulnerabilities and agentic risk

Overview

This package mixes a crypto trading skill with an unrelated video-generation skill and asks users to install mutable external code while handling API keys and possible live trading.

Review carefully before installing. Use only the quant documentation unless the publisher fixes or removes the unrelated English video-generator file. If you proceed, install in an isolated environment, pin and inspect the exact repository commit first, avoid global installs, keep API keys out of shell history and chats, disable withdrawals on exchange keys, prefer testnet or paper trading, and require explicit confirmation before any live trading.

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

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:24
Finding
Mutable Quantitative-Trading Repository and Dependencies Are Retrieved and Executed Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:24-28` and `SKILL-ZH.md:24-28` **Vulnerability Type**: Remote payload retrieval and insecure dependency installation **Risk Level**: High ### Vulnerable Code ```bash # Clone repository git clone https://github.com/ZhenRobotics/openclaw-quant.git ~/openclaw-quant cd ~/openclaw-quant # Install dependencies pip install -r requirements.txt ``` The Chinese version contains the equivalent commands: ```bash # 克隆仓库 git clone https://github.com/ZhenRobotics/openclaw-quant.git ~/openclaw-quant cd ~/openclaw-quant # 安装依赖 pip install -r requirements.txt ``` ### Technical Analysis The Skill instructs users or agents to clone the current state of a remote Git repository and immediately install its Python dependencies. It does not specify an immutable commit hash or verified release, validate a signed tag, check a cryptographic digest, or require dependency hashes. The effective code executed by the Skill is therefore not contained in the audited package and can change after this review. In addition, `pip install -r requirements.txt` may execute package build logic from dependencies selected by the externally maintained requirements file. This creates two related risks: 1. The cloned repository can be changed or compromised after publication of the Skill. 2. Its requirements can resolve to compromised, substituted, or otherwise unsafe packages. The project documentation later loads Binance API credentials from environment variables for live trading: ```python api_key=os.getenv('BINANCE_API_KEY'), api_secret=os.getenv('BINANCE_API_SECRET') ``` No evidence in the reviewed files proves that these credentials are exfiltrated. However, externally retrieved code executed in the same user environment could potentially read them. ### Attack Path 1. An attacker compromises the referenced repository, a maintainer account, a dependency, or an upstream package release. 2. The attacker modifies the default bran ...[truncated 1358 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the repository to an audited immutable commit: ```bash git clone https://github.com/ZhenRobotics/openclaw-quant.git ~/openclaw-quant cd ~/openclaw-quant git checkout --detach <audited-commit-sha> ``` 2. Publish and verify signed release tags. 3. Provide an expected commit identifier and cryptographic checksum through a trusted channel. 4. Lock every Python dependency, including transitive dependencies, to reviewed versions. 5. Generate a hash-locked requirements file and install with: ```bash pip install --require-hashes -r requirements.lock ``` 6. Install into a dedicated virtual environment rather than the user's global Python environment. 7. Perform installation before exposing exchange credentials to the process. 8. Use exchange API keys restricted to required symbols and trading operations, with withdrawals disabled. 9. Default to testnet or paper trading; require explicit confirmation before enabling live trading. 10. Include the executable implementation in the audited artifact, or independently audit the exact pinned external release. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL-EN.md:25
Finding
Video Generator Retrieves and Installs Mutable Remote Code and npm Dependencies<![CDATA[ ## Vulnerability Details **File Location**: `SKILL-EN.md:25-29`, with an additional global installation option at `SKILL-EN.md:38` **Vulnerability Type**: Remote payload retrieval and insecure dependency installation **Risk Level**: High ### Vulnerable Code ```bash # Clone to standard location git clone https://github.com/ZhenRobotics/openclaw-video.git ~/openclaw-video cd ~/openclaw-video # Install dependencies npm install ``` The document also presents this future global-installation option: ```bash npm install -g openclaw-video ``` ### Technical Analysis The instructions retrieve the current default branch of an external repository and run `npm install` without pinning the repository to an audited commit. The actual project source, `package.json`, lockfile, dependency graph, and npm lifecycle scripts are absent from the audited artifact. `npm install` may execute package lifecycle scripts such as `preinstall`, `install`, and `postinstall`. Consequently, compromise of the repository or a selected dependency could result in code execution during installation. The global installation form further broadens the installation scope and relies on a package name without an audited version or integrity value. The Skill also instructs the user to configure `OPENAI_API_KEY`. No direct credential exfiltration is visible in the reviewed Markdown, and OpenAI network access is declared as necessary for TTS and Whisper functionality. Nevertheless, the externally retrieved implementation is expected to run in an environment containing that credential, making supply-chain integrity particularly important. ### Attack Path 1. An attacker compromises the external GitHub repository, its maintainer, the npm package, or one of its dependencies. 2. The attacker adds malicious JavaScript, modifies dependency resolution, or introduces a malicious npm lifecycle script. 3. A user follows the Skill instructions and retrieves the current repository state or installs the ...[truncated 952 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the external repository to an audited commit hash rather than its mutable default branch. 2. Require signed tags or release attestations and verify them before installation. 3. Commit a reviewed `package-lock.json` and use: ```bash npm ci ``` 4. Review all npm lifecycle scripts and, where compatible with the application, initially install with: ```bash npm ci --ignore-scripts ``` 5. Pin the global package to a specific reviewed version and publish its expected integrity metadata, or remove the global installation option. 6. Avoid global installation when a project-local installation is sufficient. 7. Do not export `OPENAI_API_KEY` until installation has completed and the pinned implementation has been verified. 8. Use a restricted API key with billing limits and monitor it for anomalous usage. 9. Run rendering and API integration in a dedicated low-privilege account, container, or sandbox with limited filesystem access. 10. Include the executable source and lockfile in the audited Skill package or audit the exact external release separately. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL-EN.md:1
Finding
English Skill Variant Has a Different Identity and Functionality Than the Primary and Chinese Variants<![CDATA[ ## Vulnerability Details **File Location**: `SKILL-EN.md:1-3`, compared with `SKILL.md:1-4` and `SKILL-ZH.md:1-4` **Vulnerability Type**: Cross-language Skill identity and behavior mismatch **Risk Level**: Medium ### Vulnerable Code The English file declares a video-generation Skill: ```yaml --- name: video-generator description: Automated video generation pipeline with OpenAI TTS, Whisper, and Remotion - from text script to professional short videos tags: [video-generation, remotion, openai, tts, whisper, automation, ai-video, short-video, text-to-video] --- ``` The primary file instead declares a cryptocurrency quantitative-trading Skill: ```yaml --- name: openclaw-quant description: Professional quantitative trading system for cryptocurrency - backtesting, paper trading, live trading, and strategy optimization tags: [quant, trading, backtest, crypto, strategy, optimization, bitcoin, trading-bot, algorithmic-trading] version: 0.1.0 --- ``` The Chinese file also declares `openclaw-quant`: ```yaml --- name: openclaw-quant description: 专业的加密货币量化交易系统 - 回测、模拟盘、实盘交易和策略优化 tags: [量化交易, 回测, 加密货币, 策略, 优化, 比特币, 交易机器人, 算法交易] version: 0.1.0 --- ``` ### Technical Analysis `SKILL-EN.md` is not an English translation of the same Skill. It identifies a different product, references another repository, uses another dependency ecosystem, requires a different credential, defines different automatic triggers, and processes different user data. A consumer that selects documentation or behavior according to language could therefore receive materially different instructions from the same package: - Primary and Chinese variants install a cryptocurrency trading system and use Binance credentials. - The English variant installs a video-generation system and uses OpenAI TTS and Whisper. - The English workflow sends supplied script and audio-related data to external OpenAI services as part of its declared operation. The OpenAI transmission is necessary for the video ...[truncated 1640 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `SKILL-EN.md` from this package if it belongs to the video-generator project. 2. Publish video-generator as a separate Skill with its own package identity and audit. 3. Replace `SKILL-EN.md` with a faithful English version of `openclaw-quant`. 4. Ensure all language variants use the same: - Skill name and version. - Declared functionality. - External repositories. - Credential requirements. - Network destinations. - Trigger conditions. - Safety requirements. 5. Add automated release checks that compare front matter and security-sensitive commands across translations. 6. Require explicit user disclosure and consent before transmitting scripts, audio, account information, or other user data to third-party APIs. 7. Document the exact data sent to each external service, retention expectations, and applicable privacy controls. ]]>
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file content is for a video-generation skill, while the declared skill metadata says this package is a cryptocurrency quantitative trading system. That mismatch is a strong indicator of skill repurposing or package confusion that could cause an agent to perform unrelated external actions, undermining operator expectations and trust boundaries.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The skill instructs the agent to clone an external GitHub repository, install dependencies, and configure credentials for a completely unrelated project. In the context of a purported crypto trading skill, this is unjustified remote code acquisition and setup guidance that could lead to supply-chain compromise or unauthorized environment changes.

Vague Triggers

High
Confidence
96% confidence
Finding
The auto-trigger rules are broad enough to match ordinary discussion about videos or scripts, causing the skill to activate without clear user intent. In a mismatched skill package that also leads to shell execution and external API use, broad triggering materially increases the chance of accidental invocation.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The file directs agents to execute shell commands that invoke local scripts, `pnpm exec tsx`, and other media-generation tooling unrelated to cryptocurrency trading. This expands the agent's behavior into arbitrary external execution and network/API usage outside the declared purpose, creating a strong risk of unintended or deceptive action.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The examples classify common descriptive text as a mandatory signal to invoke the skill, which is ambiguous and can override user intent. This is especially dangerous here because the skill is already out of scope for the advertised package and could trigger unrelated code execution paths.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
**DON'T**:
- ❌ Run `npx remotion` to create new projects
- ❌ Assume project is installed without checking
- ❌ Ignore error messages
- ❌ Use hardcoded absolute paths (except `~` paths)
Confidence
75% 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
90% confidence
Finding
The skill prominently advertises live automated trading at the top-level description without an equally prominent upfront risk warning. In a financial automation context, this is dangerous because users may engage with real-money trading before seeing later caveats, which increases the likelihood of loss, misuse of API credentials, and misunderstanding that live execution requires explicit informed consent.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The auto-trigger rules use broad terms such as '量化' and '交易策略', which can overlap with ordinary conversation and cause the skill to activate unintentionally. In this skill's context, accidental activation is more dangerous because the skill can progress from analysis into paper trading or even live trading workflows, increasing the chance of risky financial actions being initiated from an ambiguous user request.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
Earlier sections describe the skill as already supporting live trading, including manifest text at L003, feature list at L048, examples at L165-L179, and CLI usage at L197-L198. The roadmap then states '版本 0.3.0' will add live trading, which directly conflicts with the documented current behavior and creates intent uncertainty about whether real trading is actually available now.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill instructs users to export exchange API credentials and enables live trading, but it does not clearly warn that secrets may be exposed through shell history, logs, screenshots, shared terminals, or by being passed into agent workflows that inspect environment variables. In the context of a trading skill, leaked credentials can lead to unauthorized account access and potentially real financial loss, especially if withdrawal or trading permissions are enabled.

Static analysis

No suspicious patterns detected.