Back to skill

Security audit

okx-cex-skill-mp

Security checks for vulnerabilities and agentic risk

Overview

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

Install only if you are comfortable letting this skill manage third-party skills across your local agent installations. Prefer pinned CLI installation, avoid `--force` unless you manually trust and verify the package, review each downloaded skill's `SKILL.md`, and confirm which agent directories will be changed before adding or removing skills.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:39
Finding
Unpinned Remote Package Installation and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 37-40 and 138-143 **Vulnerability Type**: Unpinned third-party package retrieval and execution **Risk Level**: Medium ### Complete Code Snippet ```markdown 1. Install `okx` CLI: ```bash npm install -g @okx_ai/okx-trade-cli ``` ``` ```markdown What happens under the hood: 1. Downloads skill zip from OKX marketplace API 2. Extracts and validates the package (checks SKILL.md exists, reads metadata) 3. **Verifies Ed25519 signature and SHA-256 file integrity** — blocks installation if verification fails 4. Runs `npx skills add` to install to all locally detected agents 5. Records the installation (including verification status) in `~/.okx/skills/registry.json` ``` ### Technical Analysis The documented prerequisite installs `@okx_ai/okx-trade-cli` globally without specifying the exact version, even though the skill metadata references version `1.4.7`. The effective installed package is therefore determined by the package registry at installation time rather than by the reviewed skill. The subsequent installation process invokes `npx skills add`. Unless the required package is already installed and resolution is tightly controlled, `npx` can retrieve and execute package code dynamically. The instructions do not specify an exact package version, integrity digest, trusted registry configuration, lockfile, or lifecycle-script restriction. This creates a supply-chain boundary in which code that was not included in or reviewed with this project can execute under the invoking user's account. The issue does not prove that the named dependencies are currently malicious; the risk arises from mutable, unpinned dependency resolution. ### Attack Path 1. An attacker compromises the relevant registry account, package publication pipeline, package distribution infrastructure, or another dependency in the resolved dependency tree. 2. The attacker publishes a malicious version that is selected b ...[truncated 1025 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to the reviewed version: ```bash npm install -g @okx_ai/okx-trade-cli@1.4.7 ``` 2. Replace runtime `npx skills add` resolution with a locally installed, version-pinned dependency. 3. If `npx` remains necessary, specify the exact package and version and prevent implicit installation where supported. 4. Validate downloaded packages against trusted registry integrity metadata or independently published cryptographic digests. 5. Use a controlled registry and a lockfile for development and release processes. 6. Review transitive dependencies and package lifecycle scripts before release. 7. Run installation with the least-privileged user and avoid administrator or root execution. 8. Document the exact package identity behind `npx skills add` so users can verify what will be executed. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:145
Finding
Signature Verification Can Be Explicitly Bypassed During Skill Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 145-149 **Vulnerability Type**: Unsafe integrity-verification bypass **Risk Level**: High ### Complete Code Snippet ```markdown **Force-install (bypass verification):** ```bash okx skill add grid-premium --force ``` > ⚠️ **Security warning**: `--force` bypasses signature verification and installs the skill even if verification fails. Only use this if you trust the source and understand the risk. The bypass is recorded in the registry with status `bypassed`. ``` ### Technical Analysis The normal installation process claims to enforce Ed25519 signature verification and SHA-256 file-integrity checks. The documented `--force` option disables this trust boundary and permits installation even when verification fails. A failed signature or integrity check can indicate package tampering, corruption, an unauthorized publisher, or use of an untrusted signing key. Recording the bypass in a registry and displaying a warning provides audit information but does not prevent the unverified content from being installed or subsequently loaded. The risk is amplified by the documented behavior that installs a skill across all detected agents and by the statement that installed skills operate with the agent's full local permissions. The file does not instruct an autonomous agent never to use this option or require independent digest verification and direct human approval before bypassing validation. ### Attack Path 1. An attacker publishes, substitutes, or tampers with a marketplace skill package. 2. The package fails Ed25519 signature verification or SHA-256 integrity validation. 3. The attacker persuades the user or agent to retry installation with `--force`, potentially presenting the failure as a benign signing or compatibility problem. 4. The CLI accepts the package despite the failed trust check and installs it into detected agent environments. 5. An affected agent later loads the unverified `SKI ...[truncated 851 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the ability to install packages that fail signature or integrity verification. 2. If an exceptional recovery mechanism is operationally necessary, prohibit autonomous agent use and require explicit, interactive human authorization. 3. Require the user to verify an independently obtained SHA-256 digest and trusted publisher identity before any exceptional installation. 4. Install bypassed packages only into an isolated quarantine directory rather than active agent skill directories. 5. Display the verification failure reason and package signer information before approval. 6. Require a second confirmation that clearly identifies every agent destination that will be modified. 7. Apply sandboxing and least-privilege restrictions before inspecting unverified package content. 8. Prevent automatic loading or execution of quarantined content and retain immutable audit records of any approved exception. ]]>
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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
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

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
90% confidence
Finding
The skill explicitly states it runs 'npx skills add' during installation without identifying a pinned package/version. Invoking an unpinned package through npx can fetch and execute whatever package currently resolves under that name, creating a supply-chain execution risk on the local machine with the agent's permissions.

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 and installs third-party skills anyway, despite earlier acknowledging that installed skills run locally with the agent's full permissions. In this context, bypassing verification defeats the primary trust control protecting against tampered or malicious skill packages and can directly enable arbitrary prompt/code supply-chain compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The error-handling section references 'npx skills add' as part of the installation path, again without naming a pinned package/version. Although this line is explanatory rather than executable code, it normalizes an unsafe operational pattern that could lead users or implementations to run untrusted transient packages.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The error-handling section references 'npx skills add' as part of the installation path, again without naming a pinned package/version. Although this line is explanatory rather than executable code, it normalizes an unsafe operational pattern that could lead users or implementations to run untrusted transient packages.

Missing User Warnings

Low
Confidence
82% confidence
Finding
The skill documents 'okx skill remove <name>' with no explicit warning that it deletes locally installed skill files. In a skill-management context that directly affects local agent directories, omitting the destructive side effect can cause accidental removal of user-installed capabilities or configuration-dependent assets.

Static analysis

No suspicious patterns detected.