Back to skill

Security audit

Binance-Hunter

Security checks for vulnerabilities and agentic risk

Overview

This Binance trading skill is not clearly malicious, but it gives agents and users direct live trading authority with weak safety boundaries.

Review this skill carefully before installing. Use read-only or testnet Binance keys unless you explicitly intend live trading, disable withdrawal permission, apply IP restrictions where possible, protect any credential file with restrictive permissions, and do not let an agent run the provided production order or leverage commands without explicit per-trade approval.

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
SKILL.md:40
Finding

Binance API Credentials Stored in a Plaintext File Without Required Access Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:40-48
Vulnerability Type: Plaintext storage of sensitive trading credentials
Risk Level: Medium

Vulnerable Code

markdown
### Setup Credentials

Save to `~/.openclaw/credentials/binance.json`:
```json
{
  "apiKey": "YOUR_API_KEY",
  "secretKey": "YOUR_SECRET_KEY"
}
text

### Technical Analysis

The setup instructions direct users to persist a Binance API key and secret key in an unencrypted JSON file. They do not require restrictive permissions for either the credential directory or the file.

The credential storage is relevant to the documented authenticated Binance operations, but storing secrets without specifying access controls is not the minimum safe privilege model. Depending on the user's default `umask`, operating system configuration, backup tooling, and host tenancy, the file may be readable by unintended local users or processes.

The executable analysis script does not read this credential file and only retrieves public market data. No code was found that exfiltrates credentials, and the documented authenticated requests target official Binance domains. The risk therefore arises from insecure credential-storage guidance rather than confirmed malicious behavior.

### Attack Path

1. A user follows the setup instructions and creates `~/.openclaw/credentials/binance.json`.
2. The file is created under permissive default permissions or becomes accessible through backups, diagnostics, or another local process.
3. An attacker with local filesystem access reads `apiKey` and `secretKey`.
4. The attacker uses the credentials to sign Binance API requests.
5. If the key has account-read or trading permissions, the attacker accesses account information or submits unauthorized orders. Additional effects depend on the permissions configured for the compromised key.

This path requires an attacker to gain access to the credential file throu
...[truncated 702 chars]
Remediation
View remediation

Remediation Suggestions

  1. Prefer an operating-system keychain or dedicated secret manager instead of a plaintext JSON file.
  2. If file storage is necessary, document secure creation explicitly:
    bash
    install -d -m 700 "$HOME/.openclaw/credentials"
    umask 077
    cat > "$HOME/.openclaw/credentials/binance.json"
    chmod 600 "$HOME/.openclaw/credentials/binance.json"
    
  3. Validate ownership and permissions before reading the file, and reject files that are group- or world-readable.
  4. Require least-privilege Binance keys:
    • Use read-only keys for market analysis and account inspection.
    • Enable trading permission only when order execution is required.
    • Disable withdrawal permission.
    • Apply an IP allowlist where operationally possible.
    • Use a separate key for this Skill rather than reusing a broadly privileged key.
  5. Avoid logging credential values, signed request URLs, environment dumps, or configuration-file contents.
  6. Document secure key rotation and immediate revocation procedures for suspected exposure.
  7. Reconcile the documented environment variable names with the shell examples so users are not encouraged to copy secrets into additional locations while troubleshooting.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code does analyze Binance market data, so part of the description is directionally aligned. However, several prominent advertised capabilities are not present. There is no risk calculation, position sizing, stop-loss logic, or leverage configuration/support. The 'AI market analysis' claim is overstated because the implementation is a straightforward rule-based technical analysis script using EMA, MACD, RSI, and Bollinger Bands rather than any evident AI/ML component. Therefore, the description materially overstates the skill's capabilities relative to the actual code.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation provides copy-pasteable commands for live market orders, leveraged futures positions, stop-loss/take-profit orders, leverage changes, and cancellations against production Binance endpoints. Without an explicit, prominent warning that these are real account-modifying actions, users or autonomous agents may execute irreversible trades and incur immediate financial loss.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is presented as an analysis/risk tool, but it also includes authenticated commands that can place live orders, change leverage, cancel orders, and access account data. This mismatch is dangerous because users or upstream agents may grant trust or automate use under the assumption it is read-only, leading to unauthorized or irreversible financial actions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs users to store API credentials and use authenticated requests, but it does not warn about protecting secrets, scoping keys to least privilege, or avoiding withdrawal permissions. In a financial-trading context, weak credential hygiene materially increases the risk of account compromise and unauthorized trading.

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 · SKILL.md (reported line 64)May include surrounding context.

QUERY="timestamp=${TIMESTAMP}" SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)

curl -s "https://api.binance.com/api/v3/account?${QUERY}&signature=${SIGNATURE}"
-H "X-MBX-APIKEY: ${API_KEY}" | jq '[.balances[] | select(.free != "0.00000000")]'

text

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 70)May include surrounding context.

QUERY="timestamp=${TIMESTAMP}" SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)

curl -s "https://api.binance.com/api/v3/account?${QUERY}&signature=${SIGNATURE}"
-H "X-MBX-APIKEY: ${API_KEY}" | jq '[.balances[] | select(.free != "0.00000000")]'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

This example submits a live authenticated market buy order to Binance's production API, transmitting API credentials and causing immediate account-changing effects. In context, the danger comes less from the network call itself and more from providing direct execution commands without strong safety boundaries, making accidental or automated misuse likely.

Content

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

QUERY="symbol=${SYMBOL}&side=BUY&type=MARKET&quantity=${QUANTITY}&timestamp=${TIMESTAMP}" SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)

curl -s -X POST "https://api.binance.com/api/v3/order?${QUERY}&signature=${SIGNATURE}"
-H "X-MBX-APIKEY: ${API_KEY}" | jq '.'

text

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

This example submits a live authenticated market sell order to Binance's production API and can immediately liquidate assets or alter positions. In a skill marketed partly as analysis, exposing direct sell execution in simple examples increases the risk of unintended destructive financial actions.

Content

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

QUERY="symbol=${SYMBOL}&side=SELL&type=MARKET&quantity=${QUANTITY}&timestamp=${TIMESTAMP}" SIGNATURE=$(echo -n "$QUERY" | openssl dgst -sha256 -hmac "$SECRET" | cut -d' ' -f2)

curl -s -X POST "https://api.binance.com/api/v3/order?${QUERY}&signature=${SIGNATURE}"
-H "X-MBX-APIKEY: ${API_KEY}" | jq '.'

text

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest markets "125x leverage support" as a feature, implying encouragement or readiness for very high leverage usage. Later safety guidance says to never use leverage higher than 10x without experience, which does not fully prohibit 125x use but does contradict the promotional framing of that feature and creates inconsistent user-facing intent.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency version for ccxt is specified with a caret range, which allows newer compatible releases to be installed without explicit review. This increases supply-chain risk because a compromised or breaking upstream release could be pulled into the skill during installation or deployment.

Content

Scanner excerpt · package.json (reported line 6)May include surrounding context.

json
"version": "1.0.0",
  "description": "Professional Binance trading skill with automated market analysis and risk management.",
  "dependencies": {
    "ccxt": "^4.0.0",
    "pandas": "^2.0.0",
    "ta": "^0.10.0"
  }

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The pandas dependency is not pinned to an exact version, so installations may resolve to different upstream releases over time. That creates a supply-chain exposure window where vulnerable or malicious transitive updates could be introduced unexpectedly.

Content

Scanner excerpt · package.json (reported line 7)May include surrounding context.

json
"description": "Professional Binance trading skill with automated market analysis and risk management.",
  "dependencies": {
    "ccxt": "^4.0.0",
    "pandas": "^2.0.0",
    "ta": "^0.10.0"
  }
}

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The ta package is declared with a caret version range, permitting automatic adoption of future minor/patch releases. In a trading skill that may influence financial decisions, unreviewed dependency changes can introduce instability, malicious code, or vulnerable behavior into sensitive workflows.

Content

Scanner excerpt · package.json (reported line 8)May include surrounding context.

json
"dependencies": {
    "ccxt": "^4.0.0",
    "pandas": "^2.0.0",
    "ta": "^0.10.0"
  }
}

Static analysis

No suspicious patterns detected.