Back to skill

Security audit

Okx Dex Swap

Security checks for vulnerabilities and agentic risk

Overview

This crypto-swap skill is mostly coherent, but it automatically downloads and runs a changing external CLI installer before use, which is too sensitive for automatic handling.

Review before installing. This skill can prepare approvals and broadcast real token swaps, and it may automatically install or update the onchainos CLI from OKX GitHub releases. Use it only if you trust that installer/update path, confirm token addresses and amounts yourself, and avoid sharing diagnostic summaries publicly unless wallet and transaction details are acceptable to disclose.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
_shared/preflight.md:7
Finding

Mutable Remote Installer Is Automatically Downloaded and Executed

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 216)May include surrounding context.

md
> Load on error: `references/troubleshooting.md`

## Amount Display Rules

- **Display** input/output amounts to the user in UI units (`1.5 ETH`, `3,200 USDC`)
- **CLI `--readable-amount`** accepts human-readable amounts (`"1.5"`, `"100"`); CLI converts to minimal units automatically. Use `--amount` only when passing raw minimal units explicitly.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · _shared/preflight.md (reported line 9)May include surrounding context.

  1. Resolve latest stable version: Fetch the latest stable release tag from the GitHub API:
    text
    curl -sSL "https://api.github.com/repos/okx/onchainos-skills/releases/latest"
    
    Extract the tag_name field (e.g., v1.0.5) into LATEST_TAG. If the API call fails and onchainos is already installed locally, skip steps 2-3

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This documentation promotes a one-shot swap command that approves, signs, and broadcasts an on-chain trade, but it does not prominently warn that swaps are irreversible and can result in permanent loss of funds if parameters, token addresses, routes, or amounts are wrong. In a wallet/agent setting, missing risk disclosure increases the chance that users or downstream agents execute dangerous transactions with insufficient confirmation, especially because the command can both approve token spending and submit the final swap automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The troubleshooting guidance instructs the agent to generate and potentially expose a diagnostic summary containing the user's wallet address, transaction hash, token pair, amount, slippage, timestamp, and client version, without any minimization, masking, or user-consent step. In a crypto context, this metadata can be highly sensitive because it enables wallet correlation, activity profiling, and unnecessary disclosure of trading behavior during support flows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The instruction hardcodes a region-based access message and directs the skill to tell the user the service is unavailable in their region. This is a locale/region policy constraint stated in natural language without any user opt-in or accompanying justification in the file.

Content

No source excerpt is available for this finding.