Back to skill

Security audit

okx-cex-auth

Security checks across malware telemetry and agentic risk

Overview

The skill is mostly coherent for OKX authentication, but it handles high-impact exchange access with unsafe credential-entry guidance and under-verified executable installation paths.

Review this skill carefully before installing. Prefer OAuth device authorization or local CLI credential entry, and do not paste OKX API keys, secret keys, passphrases, refresh tokens, or session tokens into chat. If installing the CLI, use a pinned reviewed version where possible and verify the package/source through OKX documentation or your own controls.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:90
Finding
Exchange API Credentials May Be Disclosed Through Agent Conversation## Vulnerability Details **File Location**: `SKILL.md:90-95` **Vulnerability Type**: Sensitive credential exposure **Risk Level**: Medium **Complete Code Snippet**: ```markdown Present the user with exactly these two options, neutrally (do NOT label OAuth as "recommended"): 1. **Replace the API key** — the user generates a new key on the OKX web console (`https://<site>/account/my-api`) and either provides `AK/SK/PP` to you or re-runs `okx config init` themselves. 2. **Switch entirely to OAuth** — first remove the broken API-key profile (`okx config use <other-profile>` or delete the profile block in `~/.okx/config.toml`), THEN run the OAuth login flow from Step 0.3. ``` ### Technical Analysis The instruction explicitly permits a user to provide an API key, secret key, and passphrase—identified as `AK/SK/PP`—directly to the Agent. These values are authentication secrets capable of granting access to an exchange account according to the permissions assigned to the API key. Entering these credentials into an Agent conversation can expose them to chat history, application telemetry, model context, tool integrations, debugging records, or other logging infrastructure. The Skill does not define a secure secret-entry mechanism, prohibit credential persistence, require redaction, or ensure that these values remain outside the conversation transcript. No intentional credential exfiltration is present in the reviewed file. The vulnerability is an insecure credential-handling practice rather than confirmed malicious behavior. ### Attack Path 1. An existing OKX API key fails with an authentication or signature error. 2. The Skill presents replacement of the API key as an option. 3. Following the instruction, the user submits the new API key, secret key, and passphrase to the Agent. 4. The credentials become part of the conversation or associated application logs. 5. A party with unauthorized access to those records ...[truncated 747 chars]
Remediation
## Remediation Suggestions 1. Remove the instruction allowing users to provide `AK/SK/PP` to the Agent. 2. Require users to enter credentials only through `okx config init` or an equivalent trusted local interactive prompt that does not echo values into chat. 3. Prefer OAuth device authorization where appropriate because it avoids transmitting primary API credentials through the Agent. 4. Add an explicit warning that API keys, secret keys, passphrases, refresh tokens, and session tokens must never be pasted into a conversation. 5. Ensure the CLI masks secret input and never emits credentials through standard output, error output, telemetry, or debug logs. 6. Support operating-system credential stores or a dedicated secret manager instead of plaintext configuration where feasible. 7. Document credential rotation and immediate revocation procedures for users who have already disclosed credentials.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding
Executable Dependencies Are Installed Without Documented Integrity Verification## Vulnerability Details **File Location**: `SKILL.md:15-20`, `SKILL.md:40-45`, and `SKILL.md:274-284` **Vulnerability Type**: Unverified third-party package and binary installation **Risk Level**: Medium **Complete Code Snippets**: ```yaml agent: requires: bins: ["okx"] install: - id: npm kind: node package: "@okx_ai/okx-trade-cli@1.4.6" bins: ["okx"] label: "Install okx CLI (npm)" ``` ```markdown Install `okx` CLI if not already installed: ```bash npm install -g @okx_ai/okx-trade-cli ``` ``` ```markdown ## Binary Management The `okx auth` commands (`login`, `logout`, `status`) depend on the `okx-auth` binary. It is normally installed automatically during `npm install`, but can also be managed manually. > **IMPORTANT for AI agents:** Do NOT manually check platform, CDN availability, or binary paths. Always use the CLI commands below — they handle platform detection and download internally. ### Install / Update ```bash okx auth install ``` Downloads or updates the `okx-auth` binary. Reports "up to date" if already current. Use `--json` for machine-readable output. ``` ### Technical Analysis The metadata pins the npm dependency to version `1.4.6`, but the prerequisite command installs `@okx_ai/okx-trade-cli` without an explicit version. That command may resolve to a newer package release than the version reviewed or declared by the Skill. A global npm installation can execute package lifecycle scripts with the installing user's privileges. The installed CLI can then download or update another executable, `okx-auth`, through `okx auth install`. The reviewed project does not provide the downloader implementation, permitted source URLs, expected cryptographic hashes, digital-signature requirements, or an independent verification procedure. The Skill also instructs Agents not to inspect platform details, CDN availability, or binary paths, which r ...[truncated 1819 chars]
Remediation
## Remediation Suggestions 1. Change the prerequisite command to the exact reviewed version: ```bash npm install -g @okx_ai/okx-trade-cli@1.4.6 ``` 2. Keep the version in the installation command synchronized with the version declared in Skill metadata. 3. Publish and document the exact official domains from which `okx-auth` may be downloaded. 4. Verify every downloaded binary using a cryptographic digest and a signature rooted in a separately distributed trusted public key. 5. Reject binaries when signatures, checksums, expected versions, platforms, or source origins do not match. 6. Publish signed checksums, provenance attestations, and reproducible-build information for each supported binary. 7. Document whether npm lifecycle scripts are used and disable them during installation when they are unnecessary. 8. Provide the source and downloader implementation for independent review. 9. Replace the prohibition on inspecting binary sources and paths with documented validation steps that Agents and users can perform safely. 10. Run installation and binary-management operations with the least privileges required; avoid administrative or root execution.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger description is excessively broad, including generic phrases like login, authenticate, first time setup, and configure okx, plus generic auth-error strings. In an agentic environment this can cause the skill to activate for loosely related requests, leading the agent to initiate authentication or credential-handling flows unnecessarily, which increases the chance of phishing-like UX, unintended account linking, or inappropriate tool execution.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The skill mandates a Chinese-only site-selection prompt regardless of the user's language. This can confuse users, reduce informed consent during an authentication flow, and increase the risk that they choose the wrong region or follow prompts they do not understand, which is especially problematic in a credential and account-authorization context.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

No suspicious patterns detected.