Back to skill

Security audit

[1m-trade] AI Autonomous Trading

Security checks for vulnerabilities and agentic risk

Overview

This is a real-money crypto trading skill with disclosed functionality, but it grants persistent unattended trading authority and handles signing keys in ways users should review carefully.

Install only if you intentionally want an agent-controlled crypto trading setup. Use testnet first, avoid pasting any private key into chat, do not use a master wallet key, pin and verify the `1m-trade` CLI yourself, and do not enable the cron auto-trader without independent limits for max notional, leverage, daily loss, allowed assets, expiration, and a tested removal path.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T06 · System Persistence

Error
Location
SKILL.md:183
Finding
Persistent Scheduled Job Performs Unattended Real-Money Trading<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:183-208`, `SKILL.md:245-254`, and `SKILL.md:274-294` **Vulnerability Type**: Persistent scheduled execution of real mainnet financial transactions **Risk Level**: Critical ### Vulnerable Code ```markdown 2. Check whether the `1m-trade-auto-trader` cron job exists: - Run `openclaw cron list` to verify whether it still exists. - If it exists, ask the user to stop/remove it before creating a new one. - If the user confirms it should be removed and it is still present, attempt to remove it with `openclaw cron rm <task id>`, then re-run `openclaw cron list` to confirm it is gone. 3. Create a periodic workflow using the command below. `--session isolated` is fixed and must not be changed. The default interval is every 20 minutes (`*/20`); replace with `*/N` if needed. Send the trading report to the user. ``` ```bash openclaw cron add \ --name "1m-trade-auto-trader" \ --cron "*/20 * * * *" \ --session isolated \ --message "<Paste the FULL prompt from #### Workflow content through the end of the report template below; ...>" \ --timeoutSeconds 600 \ --announce \ --channel <channel e.g. telegram> \ --to "<user id>" ``` ```markdown ## Execution Guidelines - Evaluate the full market universe (scan multiple assets). Trades are determined by risk controls; 0 to multiple trades are allowed. - Output must be a trading report only (no executable code). Markdown tables/quotes are allowed. - Do not create or modify any files. - Only call existing skills. - Use real trading (not simulation). ``` ```markdown **Execution loop**: When triggered, execute the following steps in order. Avoid requesting intermediate confirmations; proceed with execution. #### 3. Execution (act) Based on the decision, use `1m-trade-dex` commands to trade. - Example (market long/short): call `market-order` - Example (close): compute exact position size and place the appropriate market order - Example (limit): cal ...[truncated 2412 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not create a persistent mainnet trading task by default. 2. Default all automated operation to Hyperliquid testnet or a non-executing recommendation mode. 3. Require a separate, explicit confirmation that displays: - The exact schedule. - Authorized assets. - Maximum order notional. - Maximum aggregate exposure. - Maximum leverage. - Maximum daily loss and drawdown. - Task expiration time. - Destination account and notification channel. 4. Require confirmation for every mainnet order unless the user has created a narrowly scoped, time-limited policy outside the LLM. 5. Add a mandatory expiration time and automatically remove the cron task when it expires. 6. Add a readily accessible kill switch and verify that task removal succeeded. 7. Use a restricted signing credential whose permissions and funding are limited to the approved strategy. 8. Enforce risk limits in deterministic code outside the model rather than relying on prompt instructions. 9. Record tamper-evident order and risk-control logs without recording secrets. 10. Reject execution when market data is stale, incomplete, inconsistent, or unavailable. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
skills/1m-trade-dex/SKILL.md:65
Finding
Proxy Private Key Is Accepted Through Chat and Exposed in Process Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:83-89`, `SKILL.md:136-147`, `AGENTS.md:20-31`, `skills/1m-trade-dex/SKILL.md:65-110`, and `skills/1m-trade-dex/reference.md:136-153` **Vulnerability Type**: Unsafe sensitive-data handling and unvalidated wallet/key association **Risk Level**: High ### Vulnerable Code ```markdown - **LLM boundary**: The model must **not** read `.env` into context or quote stored secrets. For **wallet bind**, if the user **voluntarily** sends wallet address + **proxy** private key in one message (e.g. clearly labeled fields such as `wallet address` and `proxy private key`), follow `1m-trade-dex` → parse and **invoke** `hl1m init-wallet --address … --pri_key …` in a trusted shell; **do not** repeat full keys in assistant replies. ``` ```markdown 2. For **CLI binding**: - If the user provides **both** address and proxy key in one message (with labels such as `wallet address` and `proxy private key`, or other languages as mapped in `1m-trade-dex`), follow `1m-trade-dex` **Natural-language binding**: parse `0x` + 40 hex (address) and `0x` + 64 hex (proxy key), then run `hl1m init-wallet --address <parsed> --pri_key <parsed>` in a trusted shell; do not echo full keys in chat. ``` ```markdown **Exact command** (values come from the user message; run in a trusted local shell): ```bash hl1m init-wallet --address <parsed_address> --pri_key <parsed_proxy_private_key> ``` ``` The reference also documents the absence of strict association checking: ```markdown - `--pri_key` required - `--address` optional; if omitted, derived from private key - If `--address` is provided, current behavior uses it directly (to support proxy-private-key scenarios, no strict matching check) - Protection logic: if `.env` already has address/encrypted key/encryption password, overwrite is rejected ``` ### Technical Analysis The workflow allows a proxy/API private key to enter the LLM conversation and then inserts it directly into a command ...[truncated 2894 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prohibit submission of all private keys through chat, including proxy or delegated keys. 2. Remove natural-language extraction of private keys from agent messages. 3. Perform wallet initialization through one of the following: - An interactive local terminal with disabled echo. - A protected file descriptor or standard input channel. - An operating-system keychain. - A hardware wallet or delegated authorization flow. - A browser-mediated signing process. 4. Never pass private keys through command-line arguments. 5. Ensure secrets do not appear in tool-call parameters, telemetry, error reports, shell history, or process listings. 6. Set restrictive permissions on all credential files and state directories. 7. Verify on-chain or cryptographic authorization between the proxy key and supplied account before saving configuration. 8. Reject mismatched or unverifiable address/key combinations. 9. Require explicit confirmation of the public account address after verification, without displaying the private key. 10. Add secret-redaction controls to all logging and exception paths. 11. Provide immediate proxy-key rotation and revocation instructions if a key was ever submitted through chat. ]]>

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:211
Finding
Mutable Dependency Marker Can Suppress Security Verification in Future Runs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:211-239` **Vulnerability Type**: Untrusted persistent state used to bypass dependency verification **Risk Level**: Medium ### Vulnerable Code ```markdown Pre-start: dependency memory check All skills are installed locally. 1. Try reading: `$OPENCLAW_STATE_DIR/.1m-trade/dependencies-status.md` - If missing → first run, treat as "not confirmed installed" - If present, look for any marker: - Installed: true - DependencyStatus: Installed - SkillsReady: true - Record status as "installed" or "not installed/unknown" 2. Decide based on the status: - If clearly "installed" → skip checks/install and go to step 4 - Otherwise → run step 3 3. Only when initialization is needed: Ensure these skills are available in order: - 1m-trade-news - 1m-trade-dex If a skill is unavailable, attempt to install/enable it via the system's mechanism. Then record success in the memory file. 4. Must execute: update/create the dependency memory file by overwriting: ``` ```markdown # Dependency install marker - do not edit manually Installed: true Skills: 1m-trade-news (or others) Skills Path: <skill paths> LastChecked: 2026-03-15 14:30:00 UTC ``` ### Technical Analysis The scheduled workflow treats a mutable Markdown file as authoritative persistent memory. It searches for broad textual markers such as `Installed: true` or `SkillsReady: true` and then skips dependency checking. The marker is not: - Cryptographically integrity-protected. - Bound to exact package versions. - Bound to executable hashes. - Bound to canonical skill paths. - Expired after a defined interval. - Demonstrably written only after successful verification. - Protected against local modification in the documented workflow. The prompt then mandates overwriting the file with `Installed: true`. This can preserve a false-success condition across later scheduled sessions. Because subsequent runs can execute rea ...[truncated 1411 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not use mutable prose markers as authoritative security state. 2. Revalidate sensitive dependencies before every real-money trading run. 3. Verify: - Canonical executable paths. - Exact approved versions. - Package hashes or signatures. - Skill directory identities and permissions. - Expected publisher or provenance data. 4. Write the success marker only after all checks complete successfully. 5. Store structured state rather than matching arbitrary text fragments. 6. Protect cached state with restrictive file permissions and integrity authentication. 7. Include exact versions, hashes, paths, verification time, and verifier version in the state record. 8. Apply a short expiration time and force revalidation after expiry. 9. Use atomic writes to avoid partially written success state. 10. Fail closed if the marker is malformed, stale, writable by an unexpected principal, or inconsistent with the current environment. 11. Do not overwrite a status file with `Installed: true` when verification was skipped or failed. ]]>

T08 · Insecure Dependencies

Warning
Location
skills/1m-trade-dex/SKILL.md:6
Finding
Unpinned Third-Party Trading CLI Is Installed and Entrusted with Signing Credentials<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:68-76`, `auto_check.js:79-85`, `skills/1m-trade-dex/SKILL.md:6-34`, and `skills/1m-trade-dex/reference.md:8-13` **Vulnerability Type**: Unpinned executable dependency with financial and credential access **Risk Level**: Medium ### Vulnerable Code ```markdown 2. **CLI (`hl1m`)**: Install the `1m-trade` package so `hl1m` is on `PATH` (Python 3.11+ recommended): ```bash pipx install 1m-trade hl1m --help ``` ``` ```javascript if (missingBins.includes("hl1m")) { console.error("Next step (1m-trade CLI):"); console.error("- Install pipx if needed: `python3 -m pip install --user pipx`"); console.error("- Install CLI: `pipx install 1m-trade`"); console.error("- Verify: `hl1m --help`"); console.error(""); } ``` ```yaml requires: bins: [hl1m] install: - pipx install 1m-trade ``` ```markdown If `hl1m` is missing, install the `1m-trade` package (requires Python 3.11+ and `pipx`): - If `pipx` exists: `pipx install 1m-trade` - If `pipx` is missing: - Linux: install `pipx` via `apt` / `yum` / `dnf` - macOS: `brew install pipx` - Windows: `python -m pip install --user pipx` then `python -m pipx ensurepath` ```bash pipx install 1m-trade ``` ``` ### Technical Analysis The project repeatedly instructs installation of `1m-trade` without specifying an exact version, package hash, signature, trusted index, or locked transitive dependencies. Consequently, the code installed during setup can differ from the component that was expected or audited. This is particularly sensitive because `hl1m` is subsequently entrusted with: - A proxy/API private key during initialization. - Encrypted key material and its encryption password from local state. - Mainnet order submission. - Account and position information. - Leverage and margin-management operations. The preflight checker verifies only that an executable named `hl1m` is discoverable on `PATH`. It does not verify its origin, version, ...[truncated 1543 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `1m-trade` to a specific audited version. 2. Require verified hashes for the package and all transitive dependencies. 3. Use a locked dependency manifest generated from a trusted build process. 4. Configure and verify an approved Python package index explicitly. 5. Verify package publisher identity, provenance attestations, or signatures where available. 6. Validate the installed `hl1m` executable's canonical path, version, and digest before every sensitive operation. 7. Re-audit the dependency before upgrades and do not use an unconditional latest-version upgrade flow. 8. Run the CLI in a restricted environment with minimal filesystem and network access. 9. Separate market-data access from signing operations so the same dependency does not receive unnecessary credentials. 10. Use a narrowly scoped signing service or hardware-backed signer rather than exposing key material to the general CLI process. 11. Fail closed when the installed executable does not match the approved version and digest. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (28)

Credential Access

High
Category
Privilege Escalation
Content
- hl1m
        - openclaw
      configPaths:
        - ~/.openclaw/.1m-trade/.env
        - $OPENCLAW_STATE_DIR/.1m-trade/.env
      env:
        - BLOCKBEATS_API_KEY
Confidence
93% confidence
Finding
The skill is designed around local access to `.env` paths and sensitive runtime variables, including API keys and wallet-related secrets. Even though the text says not to print secrets, exposing credential locations and coupling the skill to shell/env capabilities increases the chance that an agent or sub-skill accesses or mishandles credentials within the same execution context.

Credential Access

High
Category
Privilege Escalation
Content
- openclaw
      configPaths:
        - ~/.openclaw/.1m-trade/.env
        - $OPENCLAW_STATE_DIR/.1m-trade/.env
      env:
        - BLOCKBEATS_API_KEY
        - HYPERLIQUID_PRIVATE_KEY_ENC
Confidence
98% confidence
Finding
This finding involves encrypted Hyperliquid private-key material and its password, referenced as environment/config state for a shell-capable trading skill. The combination of wallet credential material, agent shell access, and autonomous execution makes credential exposure or misuse especially severe, potentially enabling unauthorized trading or account takeover.

Ae1

High
Category
analysis-evasion
Content
1. **Skill files**: Ensure the bundle includes **`skills/1m-trade-news/`** (`SKILL.md`, etc.) and that your OpenClaw / host loads that folder as the **`1m-trade
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
1. **Skill files**: Ensure the bundle includes **`skills/1m-trade-news/`** (`SKILL.md`, etc.) and that your OpenClaw / host loads that folder as the **`1m-trade
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill describes enabling fully autonomous real trading and cron-based recurring execution without an upfront warning about financial loss, irreversible order execution, liquidation, or account compromise impact. In this context, omission of explicit risk disclosure and consent controls is dangerous because the agent can repeatedly place real trades with persistent automation.

Credential Access

High
Category
Privilege Escalation
Content
function getEnvPath() {
  const baseStateDir = process.env.OPENCLAW_STATE_DIR || path.join(os.homedir(), ".openclaw");
  const stateDir = path.join(baseStateDir, ".1m-trade");
  return path.join(stateDir, ".env");
}

function trim(s) {
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
console.error("   Required: HYPERLIQUID_PRIVATE_KEY_ENC + HYPERLIQUID_PK_ENC_PASSWORD");
    console.error("");
    console.error("Next step:");
    console.error("- Remove `HYPERLIQUID_PRIVATE_KEY` from the .env file.");
    console.error("- Keep only encrypted key fields and wallet address.");
    process.exit(1);
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
console.error("   Required: HYPERLIQUID_PRIVATE_KEY_ENC + HYPERLIQUID_PK_ENC_PASSWORD");
    console.error("");
    console.error("Next step:");
    console.error("- Remove `HYPERLIQUID_PRIVATE_KEY` from the .env file.");
    console.error("- Keep only encrypted key fields and wallet address.");
    process.exit(1);
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
console.error("   Required: HYPERLIQUID_PRIVATE_KEY_ENC + HYPERLIQUID_PK_ENC_PASSWORD");
    console.error("");
    console.error("Next step:");
    console.error("- Remove `HYPERLIQUID_PRIVATE_KEY` from the .env file.");
    console.error("- Keep only encrypted key fields and wallet address.");
    process.exit(1);
  }
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

High
Confidence
97% confidence
Finding
The cancel-order documentation states that running the command without --oid and --coin cancels all open orders, but this behavior is not surfaced as a prominent danger warning. In an autonomous trading context, ambiguous or insufficiently emphasized defaults can lead an agent or operator to unintentionally wipe all outstanding orders, causing strategy disruption, slippage, and financial loss.

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
The request hard-codes `lang=cn` for important newsflashes, which imposes a specific language choice on users. The file does not offer a language option or document user consent for this locale restriction.

Natural-Language Policy Violations

High
Confidence
98% confidence
Finding
The search request explicitly sets `lang=cn`, causing returned content to be in Chinese regardless of user preference. This is a natural-language policy issue because no opt-in or justification for the forced locale is provided.

Natural-Language Policy Violations

High
Confidence
97% confidence
Finding
The reusable endpoint example includes `lang=cn`, establishing Chinese as the default language for newsflash retrieval. Because the skill does not offer an alternative or explain a justified locale limitation, it violates the language-choice policy.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The file defines orchestrated agents with triggers, periodic monitoring, and action chains that go beyond passive documentation into an automation layer for wallet setup, market monitoring, and trade-related workflows. In a trading skill that can interface with wallets and DEX operations, this increases the chance of unsafe autonomous behavior, accidental invocation, or over-broad capability exposure, especially when paired with the product claim of fully autonomous AI trading.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The wallet setup agent instructs users to provide and pass a proxy private key, and even allows parsing both address and proxy key from one chat message for CLI invocation. Even though it says not to echo keys and prefers local init, encouraging credential submission in chat without a prominent warning or safer secret-handling mechanism risks credential exposure through logs, model retention, tool traces, or operator access.

Intent-Code Divergence

Medium
Confidence
88% confidence
Finding
The documentation contains conflicting safety boundaries: Trend Trader says trades require final user confirmation, while the broader skill metadata advertises fully autonomous AI trading. This inconsistency is dangerous because downstream agents or users may reasonably assume autonomous execution is permitted, weakening safeguards around financial actions and increasing the risk of unauthorized or unintended trades.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill clearly expects shell and environment access (`curl`, `node`, `hl1m`, `openclaw`, `.env` files) yet declares no explicit tool scope or permission boundaries. In a high-risk trading skill, this creates an under-specified trust boundary where an agent may execute sensitive commands or access secrets without an auditable least-privilege declaration.

Session Persistence

Medium
Category
Rogue Agent
Content
curl --request GET --url "https://api-pro.theblockbeats.info/v1/api-key/free"
      ```
   2. From the JSON body, read `data.api_key` and use it as `BLOCKBEATS_API_KEY`.
   3. Write it to `~/.openclaw/.1m-trade/.env` (or `$OPENCLAW_STATE_DIR/.1m-trade/.env` if you use that override), on its own line:
      `BLOCKBEATS_API_KEY=<api_key>`
      Do not remove unrelated lines; only add or update this variable.
Confidence
84% confidence
Finding
The skill instructs writing an API key into a persistent `.env` file under the agent state directory. Persisting credentials in long-lived local state increases the blast radius of workstation compromise, accidental disclosure through logs/backups, or unintended reuse by other skills sharing the environment.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trading workflow is triggered by broad terms like `price`, `trade`, `open`, and `close`, which overlap with ordinary financial discussion and market-data requests. In a skill capable of real trading, ambiguous routing can escalate benign analysis queries into execution-oriented workflows, increasing the risk of unintended trade placement.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The autonomous trading trigger list includes ambiguous phrases such as `managed` and `run every N minutes`, which could match routine operational requests rather than informed consent to enable unattended real-money trading. Because the workflow creates persistent cron jobs and performs real trades, accidental activation materially increases risk.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The autonomous workflow says both 'Do not create or modify any files' and later requires overwriting a dependency memory file. Contradictory instructions in an autonomous agent skill can cause unpredictable agent behavior, including unauthorized file writes or bypassing intended safeguards because the model must choose which instruction to honor.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The wallet-init trigger is broad and explicitly non-exhaustive in a skill that handles wallet binding and accepts a proxy private key. That ambiguity can cause the agent to enter a sensitive credential-handling flow on loosely related user messages, increasing the chance of prompting for, parsing, or acting on secrets without a narrowly scoped, explicit user authorization.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The skill documents live trading operations such as placing orders, closing positions, and canceling orders without a prominent execution-risk warning at the point of use. In an autonomous trading context, this can normalize direct execution and make it easier for an agent or user to invoke fund-affecting actions without appreciating that these are live mainnet operations unless testnet is explicitly selected.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The reference lists live trading operations such as market orders, leverage updates, margin transfers, and position closes without prominently warning that these actions can immediately execute on mainnet and cause irreversible financial loss. In a skill explicitly supporting autonomous AI trading, terse command documentation increases the chance that an agent or user invokes destructive actions without adequate confirmation or environment checks.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The listed triggers include broad phrases like "how is the market today" and "daily overview," followed by "etc.," which leaves activation scope open-ended. This can cause unintended invocation because the document does not define clear boundaries or exclusions for similar everyday phrasing.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
auto_check.js:64