Back to skill

Security audit

Outsmart DEX Trading

Security checks for vulnerabilities and agentic risk

Overview

This Solana trading skill is coherent with its purpose, but it needs review because it can move real funds using a raw wallet private key stored in a predictable config file through an unpinned third-party CLI.

Only install this if you already trust the outsmart npm package and are comfortable giving it signing authority over a Solana wallet. Use an isolated environment and a dedicated low-balance wallet, prefer dry runs before execution, verify token mints, pools, destinations, and amounts before every transaction, and treat ~/.outsmart/config.env as a highly sensitive secret file.

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

Error
Location
SKILL.md:4
Finding
Unpinned Third-Party CLI Installed with Access to Wallet Credentials## Vulnerability Details **File Location**: `SKILL.md:4` and `SKILL.md:35-40` **Vulnerability Type**: Unpinned and unaudited third-party dependency **Risk Level**: High ### Vulnerable Code ```yaml metadata: { "openclaw": { "requires": { "bins": ["outsmart"], "env": ["PRIVATE_KEY", "MAINNET_ENDPOINT"] }, "install": [{ "id": "node", "kind": "node", "package": "outsmart", "bins": ["outsmart"], "label": "Install outsmart CLI (npm)" }] } } ``` ```bash npm i -g outsmart outsmart init # Enter your PRIVATE_KEY and MAINNET_ENDPOINT when prompted # Config saved to ~/.outsmart/config.env ``` ### Technical Analysis The Skill installs the unscoped npm package `outsmart` globally without pinning an exact version or verifying an integrity hash, package provenance, or signed release. Consequently, the code installed depends on whichever package version the npm registry resolves at installation time. Global npm installation may execute package lifecycle scripts with the installing user's permissions. The installed executable is subsequently given access to the `PRIVATE_KEY` environment variable and is expected to perform irreversible blockchain transactions. The repository contains no implementation of the CLI, so its credential handling, transaction construction, network communications, and installation behavior cannot be verified from the audited artifact. The referenced GitHub homepage also does not cryptographically establish that the npm artifact corresponds to reviewed source. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution chain, or a future package release. 2. The victim follows the Skill instructions and runs `npm i -g outsmart`. 3. npm retrieves the attacker-controlled current release because no version or integrity value is pinned. 4. Malicious code executes through an installation lifecycle script or when the `outsmart` binary is invoked. 5. The code reads the wallet privat ...[truncated 811 chars]
Remediation
## Remediation Suggestions - Pin the npm dependency to an exact, independently reviewed version rather than resolving the latest release. - Lock and verify the package tarball with a cryptographic integrity hash. - Verify npm provenance and publisher identity, and ensure the published artifact corresponds to a specific reviewed source commit. - Audit the package source, transitive dependencies, lifecycle scripts, network behavior, key handling, and transaction construction before use. - Avoid global installation. Install the package in an isolated, non-privileged environment with a lockfile. - Disable npm lifecycle scripts during installation where compatible, and separately review any scripts that are genuinely required. - Restrict filesystem and network access through sandboxing or containerization. - Use a dedicated low-value wallet and require explicit user confirmation for transaction destinations and amounts. - Prefer a hardware wallet or external signer so the third-party CLI never receives the raw private key.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:35
Finding
Solana Private Key Persisted in a Plaintext Configuration File## Vulnerability Details **File Location**: `SKILL.md:35-40` and `SKILL.md:192-201` **Vulnerability Type**: Plaintext storage of sensitive wallet credentials **Risk Level**: High ### Vulnerable Code ```bash npm i -g outsmart outsmart init # Enter your PRIVATE_KEY and MAINNET_ENDPOINT when prompted # Config saved to ~/.outsmart/config.env ``` ```markdown ## Environment | Variable | Required | Description | |----------|----------|-------------| | `PRIVATE_KEY` | Yes | Base58 Solana private key | | `MAINNET_ENDPOINT` | Yes | Solana RPC endpoint | | `JUPITER_API_KEY` | No | Jupiter Ultra, Shield | | `DFLOW_API_KEY` | No | DFlow adapter | Config file: `~/.outsmart/config.env` ``` ### Technical Analysis The documented initialization process requests a Base58 Solana private key and saves configuration to `~/.outsmart/config.env`. An environment-style file ordinarily stores values in plaintext. The Skill does not require encryption, owner-only permissions, an operating-system credential store, a hardware wallet, an external signing service, or a dedicated low-value wallet. A Solana private key is a bearer credential: possession generally permits transaction signing without an additional server-side authorization check. Unlike a password, exposure can immediately authorize irreversible asset transfers. Storing the key in a predictable path also simplifies discovery by local malware, malicious dependencies, other users with filesystem access, backup systems, support bundles, or accidentally overbroad synchronization and archival tools. ### Attack Path 1. The user runs `outsmart init` and supplies the wallet's Base58 private key. 2. The initialization process stores the credential in the documented `~/.outsmart/config.env` path. 3. A malicious local process, compromised npm dependency, unauthorized local user, backup reader, or diagnostic collector accesses the predictable plaintext file. 4. The attacker ext ...[truncated 861 chars]
Remediation
## Remediation Suggestions - Do not store raw wallet private keys in plaintext configuration files. - Integrate a hardware wallet, OS credential manager, encrypted keystore, or external signing service. - Design the CLI so signing occurs outside the trading process and the raw key is never exposed to npm package code. - If file-based storage cannot immediately be removed, encrypt the key at rest with a user-supplied secret and enforce owner-only filesystem permissions. - Validate the containing directory and file ownership before every use, reject symbolic links, and avoid permissive fallback behavior. - Exclude the configuration file from version control, cloud synchronization, backups, logs, crash reports, and support bundles. - Prevent secret values from being printed in command output, shell history, telemetry, or error messages. - Require a dedicated low-value trading wallet rather than a primary wallet. - Add clear key-rotation and incident-response instructions. If disclosure is suspected, users should create a new wallet and move assets immediately because deleting the exposed file is insufficient.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (5)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill documents buy, sell, liquidity management, fee claiming, sniping, and pool creation commands without a prominent warning that these can submit real mainnet transactions affecting user funds. In the context of a Solana trading CLI configured with a private key, omission of an explicit transactional-risk warning can mislead users or downstream agents into treating examples as harmless informational commands.

Missing User Warnings

High
Confidence
96% confidence
Finding
The setup instructions tell the user to enter a Solana private key and note that configuration is saved to ~/.outsmart/config.env, but they do not prominently warn that this credential grants direct control over funds and must be handled as highly sensitive secret material. Storing or prompting for a raw private key without strong caution increases the risk of accidental disclosure, insecure persistence, or unsafe operational practices.

Session Persistence

Medium
Category
Rogue Agent
Content
---
name: outsmart-dex-trading
description: "Trade tokens on Solana via the outsmart CLI: buy, sell, quote, find pools, add/remove liquidity, claim fees, snipe, create pools. Use when: user asks about Solana trading, swaps, DEX, liquidity, pool, buy token, sell token, check price, wallet balance. NOT for: Ethereum/EVM trading, CEX orders, cross-chain bridging."
homepage: https://github.com/outsmartchad/outsmart-cli
metadata: { "openclaw": { "requires": { "bins": ["outsmart"], "env": ["PRIVATE_KEY", "MAINNET_ENDPOINT"] }, "install": [{ "id": "node", "kind": "node", "package": "outsmart", "bins": ["outsmart"], "label": "Install outsmart CLI (npm)" }] } }
---
Confidence
72% confidence
Finding
The skill is designed around persistent access to environment-provided wallet credentials, including PRIVATE_KEY and MAINNET_ENDPOINT, and broad auto-invocation criteria increase the chance that a session with loaded secrets is used in situations beyond the narrow intent the user expected. In a trading skill, session-persistent wallet access magnifies the consequences of accidental activation because funds can be acted on immediately.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill metadata uses very broad trigger phrases like 'trading', 'swaps', 'DEX', and 'wallet balance', which can match many ordinary user requests and cause the skill to activate too readily. Because this skill can perform real on-chain operations tied to a funded wallet, overbroad activation increases the chance of unintended transactional guidance or execution in a sensitive financial context.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The 'When to Use' examples are short and ambiguous, for example 'Sell my tokens' or 'What's my wallet balance?', and may trigger on casual discussion or exploratory questions rather than explicit consent to use a transaction-capable skill. In a financial skill that interfaces with a private key and mainnet endpoint, ambiguous routing materially raises the risk of unsafe or unintended actions.

Static analysis

No suspicious patterns detected.