Back to skill

Security audit

OpenClaw Binance

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a Binance market-reporting tool, but it unnecessarily asks users to store sensitive Binance API credentials in plaintext for behavior that only uses public market data.

Review before installing. Do not put real Binance API keys into this skill unless you understand why they are needed; for the current implementation they appear unnecessary. If you test it anyway, use a dedicated read-only key, disable withdrawals and trading permissions, enable IP restrictions, keep config.json out of source control and shared workspaces, and treat the Feishu webhook URL as a secret.

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
main.py:20
Finding

Unnecessary Storage of Binance API Credentials in a Plaintext Configuration File

Content
View full analysis

Vulnerability Details

File Location: main.py:20-24, config.example.json:1-4, README.md:15-18, and SKILL.md:15-18
Vulnerability Type: Plaintext storage and unnecessary use of sensitive credentials
Risk Level: Medium

Vulnerable Code

main.py:20-24:

python
with open(CONFIG_FILE, "r", encoding="utf-8") as f:
    CONFIG = json.load(f)

# Binance client initialization
client = Client(CONFIG["API_KEY"], CONFIG["SECRET_KEY"])

config.example.json:1-4:

json
{
  "API_KEY": "your_binance_api_key",
  "SECRET_KEY": "your_binance_secret_key",
  "FEISHU_WEBHOOK_URL": "https://open.feishu.cn/open-apis/bot/v2/hook/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

The installation instructions in README.md:15-18 and SKILL.md:15-18 direct users to obtain Binance credentials and place them in the JSON configuration.

Technical Analysis

The application loads a Binance API key and secret directly from a plaintext JSON file in the working directory. Plaintext workspace files can be exposed through accidental source-control commits, backups, shared workspace access, overly broad filesystem permissions, support archives, or unrelated processes running under the same account.

These credentials are also unnecessary for the behavior implemented by this project. The only Binance operation is client.get_klines, which retrieves public market-candle data and does not require authenticated account access. Requiring credentials for a public-data monitoring function violates least-privilege principles and increases exposure without providing a functional security benefit.

The application does not itself transmit the credentials to the configured Feishu webhook, and no credential-stealing behavior was identified. Exploitation therefore requires an attacker to obtain access to the user's configuration file or a copy of it.

Attack Path

  1. A user follows the documentation and stores a real Bi ...[truncated 1318 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the API key and secret requirements for public market-data collection. Initialize the Binance client without credentials when only public endpoints are used.
  2. Remove API_KEY and SECRET_KEY from config.example.json and update both documentation files so users are not instructed to create unnecessary exchange credentials.
  3. If authenticated functionality is added later, load credentials from environment variables or a platform-managed secret store rather than a JSON file in the workspace.
  4. Add config.json, .env, credential exports, generated reports, and other local secret-bearing files to .gitignore.
  5. Apply restrictive filesystem permissions to any unavoidable local secret file so it is readable only by the service account.
  6. Document that Binance keys must use the minimum required permissions. Disable withdrawals, enable IP allowlisting, and use a dedicated read-only key wherever possible.
  7. Validate at startup that authenticated credentials are requested only when a feature actually requires a private Binance endpoint.
  8. Rotate any credentials that have already been stored in a repository, shared workspace, backup, or support archive; deleting an exposed file is not sufficient to revoke copied credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README instructs users to place Binance API credentials into a local config file but provides no guidance on secure handling, least-privilege API key settings, exclusion from version control, or secret storage. For a trading-related skill, exposed exchange credentials could allow unauthorized account access, strategy surveillance, or trading actions depending on the key permissions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs users to obtain Binance API credentials and place them into a local config file, but provides no warning about secret handling, storage security, least-privilege permissions, or the risk of accidental exposure. Because exchange API keys can enable account access and automated trading actions, poor handling can lead to financial loss if the config file is leaked, synced, or committed to source control.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The top-level documentation describes the skill as a formal Binance quantitative trading monitoring system supporting real-time monitoring, data analysis, and risk warning. In implementation, the code fetches 24 hourly klines once, computes basic metrics, writes a local markdown report, optionally posts one alert, and exits; there is no real-time monitoring mechanism and no actual trading behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Natural-language strings, comments, and user-facing messages throughout the file are exclusively in Chinese, which effectively forces a specific language experience. The file does not provide an opt-in language selection or explain that the skill is intentionally limited to a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

The skill transmits data to an externally configured Feishu webhook URL without validation, allowlisting, or clear data-governance controls. While the current payload is limited to an alert message, webhook endpoints are sensitive integration secrets; a misconfigured or malicious URL could cause unintended outbound data disclosure or signaling to attacker-controlled infrastructure.

Content

Scanner excerpt · main.py (reported line 103)May include surrounding context.

python
}
        }
        try:
            response = requests.post(CONFIG["FEISHU_WEBHOOK_URL"], headers=headers, json=data, timeout=10)
            if response.status_code == 200:
                print("✅ 飞书预警推送成功!")
            else:

Known Vulnerable Dependency: requests==2.32.5 — 2 advisory(ies): CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func); CVE-2026-25645 (Requests is a HTTP library. Prior to version 2.33.0, the `requests.utils.extract)

Medium
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is pinned to requests==2.32.5, and the finding indicates this version is affected by a known vulnerability fixed in 2.33.0. Even though the vulnerable code path is a utility function and may not always be exercised, shipping a known-vulnerable version creates avoidable exposure if the skill or any bundled code invokes the affected functionality, especially when handling attacker-influenced archives or temporary files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes broad capabilities such as real-time monitoring, strategy analysis, report generation, and pushing alerts, but it does not define clear activation boundaries, user consent requirements, or trigger constraints. In a financial trading context, ambiguous invocation can cause the agent to act on sensitive market, account, or reporting tasks in situations the user did not explicitly intend, increasing the risk of overreach or misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The natural-language instructions and usage guidance are entirely in Chinese, which imposes a specific language on users without any opt-in or documented regional constraint. The stated policy requires flagging language or locale restrictions unless the skill offers a choice or clearly justifies the locale limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

All user-facing instructions in the skill file are provided exclusively in Chinese, and the document does not indicate that the skill is region-specific or offer an alternative language option. Under the language/locale policy, forcing a specific language without user opt-in can be a policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The config sets TIMEZONE to Asia/Shanghai, which is a locale-specific default expressed in natural language/config data. The file does not indicate that this locale is optional, user-selectable, or justified as region-specific behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The code creates a local directory and writes a report file under data/binance_trades, but there is no prior disclosure in a docstring, comment, or confirmation step that the skill will persist generated data to disk. Although it prints the report path after writing, that occurs only after the file has already been created.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The title, description, tags, support field, and examples are presented in Chinese only, which may effectively force a specific language experience without documenting user opt-in or a justified locale constraint. Under the language/locale policy, this can be a natural-language policy issue unless the skill explicitly states it is intended for a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
config.example.json:5