Back to skill

Security audit

okx-cex-skill-mp

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed OKX marketplace manager, but it can install third-party trading skills across multiple local agents and includes risky install-bypass paths users should review carefully.

Install only if you trust the OKX CLI source and the specific marketplace skills you plan to add. Prefer pinned CLI versions, avoid `--force`, review each downloaded `SKILL.md`, and be aware that the default add flow may modify multiple local agent environments.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:39
Finding
Unpinned npm and npx Dependencies Enable Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md:39` and `SKILL.md:142` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code At `SKILL.md:39`: ```bash npm install -g @okx_ai/okx-trade-cli ``` At `SKILL.md:142`: ```text 4. Runs `npx skills add` to install to all locally detected agents ``` ### Technical Analysis The documented prerequisite installs `@okx_ai/okx-trade-cli` without an explicit version, despite the project metadata referencing version `1.3.7`. Consequently, npm resolves the package version available under the applicable distribution tag at installation time rather than a version reviewed as part of this audit. The installation workflow also delegates agent installation to `npx skills add` without specifying an exact package version or integrity hash. Depending on the local npm environment, npx may retrieve package content from the configured registry and execute it immediately. The effective executable payload can therefore differ from the content reviewed in this project. No lockfile, checksum, package signature, or other local integrity control is present in the audited project to constrain either operation. The global CLI installation and subsequent installation into all detected agents increase the affected scope if a registry account, package release, transitive dependency, configured registry, or package-resolution process is compromised. ### Attack Path 1. An attacker compromises a relevant npm publisher account, registry, package release, transitive dependency, or package-resolution source. 2. The attacker publishes or serves a malicious version that satisfies the unpinned package request. 3. A user follows `SKILL.md` and runs the global npm installation command, or invokes the documented skill installation flow that uses npx. 4. npm or npx downloads the attacker-controlled package content because no exact version and verified integrity value constrain resolution. 5. I ...[truncated 1235 chars]
Remediation
## Remediation Suggestions 1. Pin the documented CLI installation to the exact reviewed version: ```bash npm install -g @okx_ai/okx-trade-cli@1.3.7 ``` 2. Replace the implicit npx package resolution with an explicit package name and exact version. For example: ```bash npm exec --package=skills@EXACT_REVIEWED_VERSION -- skills add ``` 3. Verify package integrity using a trusted checksum, npm lockfile integrity metadata, provenance attestations, or registry signatures before execution. 4. Avoid global installation where practical. Use a project-local dependency with a committed lockfile and invoke it from the local dependency tree. 5. Disable or carefully review dependency lifecycle scripts where they are unnecessary. Perform installation in a restricted environment with minimal filesystem, credential, and network access. 6. Require explicit user confirmation before installing content into multiple agent environments. Display the resolved package name, version, registry, publisher, destination directories, and verification status before proceeding. 7. Ensure the implementation invokes npx in a mode that refuses implicit package installation or unexpected resolution. Installation should fail closed if the exact approved package version is unavailable. 8. Add automated dependency monitoring and periodically review pinned versions before updating them.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Ae1

High
Category
analysis-evasion
Content
- `SKILL.md` — the skill's main instruction file
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description enumerates many trigger phrases but then broadens scope to 'any request to discover, install, update, verify, or manage AI trading skills,' which lacks clear boundaries and could match common marketplace-management requests beyond the intended context. It does include some exclusions, but not enough to fully constrain when this skill should or should not activate for overlapping skill-management intents.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The skill states that installation runs `npx skills add` under the hood without any visible package name or pinned version. Executing unpinned packages via `npx` can fetch and run unexpected code from the registry or resolve to a malicious package/version, which is especially dangerous here because the command installs third-party skills across detected agents.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
4. Runs `npx skills add` to install to all locally detected agents
5. Records the installation (including verification status) in `~/.okx/skills/registry.json`

**Force-install (bypass verification):**
```bash
okx skill add grid-premium --force
```
Confidence
95% confidence
Finding
The documented `--force` option explicitly bypasses Ed25519 signature verification for third-party skills that run locally with the agent's full permissions. That turns a protected supply-chain workflow into an arbitrary code/instruction installation path, allowing tampered or malicious skills to be installed despite failed verification.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
This error-handling guidance tells users that when `npx skills add` fails they should switch flows, confirming reliance on an unpinned `npx`-based installer. Even though this line is descriptive, it documents and normalizes a risky execution path that may run remote code during installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding
This error-handling guidance tells users that when `npx skills add` fails they should switch flows, confirming reliance on an unpinned `npx`-based installer. Even though this line is descriptive, it documents and normalizes a risky execution path that may run remote code during installation.

Static analysis

No suspicious patterns detected.