Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

OpenD CLI for MooMoo

v1.0.1

Agentic trading and market-data workflows for Futu OpenD (MooMoo/Futu OpenAPI), including OpenClaw-compatible secret-ref credential loading, account discover...

0· 378·1 current·1 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Suspicious
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
The name/description (OpenD CLI for MooMoo) aligns with the included Python CLI, core client, and credential helpers. The code interacts only with a local OpenD host via the moomoo/futu SDK and implements account discovery, snapshots, positions, and order placement as advertised. One mismatch: the registry metadata listed "Required env vars: none," while SKILL.md and the code document secret inputs (OPEND_PASSWORD_SECRET_REF, MOOMOO_PASSWORD, MOOMOO_CONFIG_KEY); this appears to be a packaging/metadata oversight but does not change the functional purpose.
Instruction Scope
SKILL.md stays within the stated domain: it documents using the local OpenD host, credential methods, and safety defaults (SIMULATE). The instructions reference local files (config.enc, config.key) and env refs for credentials — which is expected for a trading wrapper. The guidance explicitly warns to use secret-ref injection for hosted use and to treat legacy paths as local-only. There are no instructions to read or transmit unrelated system data or to contact external endpoints beyond the SDK/OpenD local host.
Install Mechanism
No install spec is provided (instruction-only install), and all included code is plain Python. There are no remote download URLs or archive extraction steps in the bundle. The skill does recommend installing SDKs (moomoo or futu) and optional libraries (keyring, cryptography), which is proportionate to the functionality.
Credentials
The secrets and env vars documented in SKILL.md and used in code are proportional to a trading skill: OPEND_PASSWORD_SECRET_REF (preferred), MOOMOO_PASSWORD, MOOMOO_CONFIG_KEY, and runtime overrides (OPEND_HOST, OPEND_PORT, OPEND_SDK_PATH, etc.). The only concern is the registry metadata claiming no required env vars while the package clearly documents secret inputs — verify the registry entry before hosted deployment. No unrelated third-party credentials are requested.
Persistence & Privilege
The skill does not request always:true or other elevated persistent privileges. It does not modify other skills or system-wide agent settings. Autonomous invocation is allowed (platform default) but is not combined with other high-risk indicators here.
Assessment
This skill appears to do what it says: a local OpenD/Futu (MooMoo) CLI wrapper that supports secret-ref credential loading and simulated or live orders. Before installing or using with real money, do the following: - Inspect and run the code in a safe environment (SIMULATE remains the default) and exercise the simulated trading paths first. - Prefer OPEND_PASSWORD_SECRET_REF / gateway secret injection for hosted deployments; avoid setting MOOMOO_PASSWORD as a plain environment variable in hosted/shared environments. - Verify the registry metadata and packaging: the bundle and SKILL.md document secret env vars, but the registry metadata claimed none — ensure the published registry entry accurately lists the required secrets. - Carefully control OPEND_SDK_PATH: the code will insert that path into sys.path and import moomoo/futu from it. Only point OPEND_SDK_PATH at trusted SDK code; an attacker-controlled SDK path could execute arbitrary code on import. - setup_config.py writes config.key and config.enc locally (key file is written with mode 600). Treat these files as sensitive and move keys into a secret manager if used. - If you intend to run live trading (trd_env=REAL), require explicit user confirmation and validate unlock behavior; consider additional manual review or approval steps in any agent workflow that could invoke live orders. If you are unsure, run the provided smoke test (python3 scripts/release_smoke_test.py) and run the CLI with --help to confirm behavior, and keep live trading disabled until you have audited the environment and credential provisioning.

Like a lobster shell, security has layers — review code before you run it.

latestvk972ewhva23ctxhfjwcdhqq6d1822a0v

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

OpenD Skill

Use this skill to execute local OpenD operations through a single CLI surface.

Quick Start

  • Ensure OpenD is running on 127.0.0.1:11111, or override with OPEND_HOST and OPEND_PORT.
  • Install one provider SDK: moomoo or futu.
  • Prefer OpenClaw-managed secret refs for hosted use:
    • export OPEND_PASSWORD_SECRET_REF='{"source":"env","id":"MOOMOO_PASSWORD"}'
    • Provide the actual MOOMOO_PASSWORD through OpenClaw gateway secret injection, not plain shell export.
  • Optional local-only helpers: pip install keyring cryptography.

Primary Interface

Use Bash CLI ./openclaw for routine operations. If the wrapper is unavailable in a published bundle, use python3 opend_cli.py directly and treat that as a packaging bug.

Examples:

  • Snapshot:
    • ./openclaw snapshot --codes HK.00700,US.AAPL
  • Accounts:
    • ./openclaw accounts
  • Positions:
    • ./openclaw --trd-env SIMULATE positions
  • Place simulated order:
    • ./openclaw --market HK --trd-env SIMULATE place-order --code HK.00700 --price 100 --qty 100 --side BUY
  • Cancel order:
    • ./openclaw --market HK --trd-env SIMULATE cancel-order --order-id <ORDER_ID>

Credential Methods

  • Default: openclaw
    • Reads OPEND_PASSWORD_SECRET_REF first.
    • Current local resolver accepts OpenClaw-style env refs only: {"source":"env","id":"ENV_VAR_NAME"}.
    • file and exec refs must be resolved by the OpenClaw gateway before launching this skill.
  • Legacy compatibility:
    • env: reads MOOMOO_PASSWORD
    • config: reads MOOMOO_CONFIG_KEY and decrypts config.enc
    • keyring: prompts once and stores password in the OS keyring
  • Deliberate warning:
    • env, config, and keyring bypass the preferred OpenClaw secret-ref audit path. Use them only for local development or controlled offline workflows.

Agentic Defaults

  • Prefer --output json so downstream steps can parse results.
  • Prefer SIMULATE unless the user explicitly requests live trading.
  • Query accounts first for unknown environments, then pass explicit --acc-id.
  • For live trading, unlock is required. Simulated accounts skip unlock automatically.

Safety and Secret Handling

  • This repository is an open-source wrapper around a commercial trading API provider. Users are expected to inspect and modify it as needed.
  • Hosted or shared deployments should use OpenClaw secret management, not raw shell environment variables.
  • setup_config.py and config.enc are legacy compatibility helpers. They no longer print reusable keys to stdout, but they still create local secret material and should be treated as sensitive.
  • keyring stores credentials in the OS keychain. Confirm that storage model is acceptable before using it.
  • OPEND_SDK_PATH changes where Python imports moomoo or futu from. Only point it at trusted code.

Environment and Runtime Inputs

Secrets:

  • OPEND_PASSWORD_SECRET_REF
  • MOOMOO_PASSWORD
  • MOOMOO_CONFIG_KEY

Non-secret overrides:

  • OPEND_HOST
  • OPEND_PORT
  • OPEND_MARKET
  • OPEND_SECURITY_FIRM
  • OPEND_TRD_ENV
  • OPEND_CREDENTIAL_METHOD
  • OPEND_OUTPUT
  • OPEND_SDK_PATH

Files

  • openclaw: Bash CLI entrypoint.
  • opend_cli.py: structured command interface.
  • opend_core.py: shared OpenD logic.
  • credentials.py: secret-ref, env, keyring, and config password loading.
  • references/api_docs.md: official API links and key limits.
  • references/release_checklist.md: pre-publish validation checklist.

Legacy Compatibility

Older scripts delegate to opend_cli.py:

  • get_market_snapshot.py
  • query_positions.py
  • place_order.py
  • place_order_env.py
  • place_order_keyring.py
  • place_order_config.py

Files

17 total
Select a file
Select a file to preview.

Comments

Loading comments…