Back to skill

Security audit

Conflux Wallet Skill

Security checks for vulnerabilities and agentic risk

Overview

This wallet skill is high-risk because it manages real crypto funds while downloading and installing unpinned code that was not included in the reviewed package.

Review this skill carefully before installing. Use an isolated machine or user account, start with negligible funds, pin and inspect the GitHub source and dependencies before running npm install, and never approve transfers, swaps, approvals, or contract writes unless you have independently verified the recipient, token contract, chain, amount, and gas cost.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:34
Finding

Unpinned Remote Code Retrieval and Dependency Execution

Content
View full analysis
/dev/null rm -rf /tmp/conflux-wallet-tmp cd "$SKILL_DIR" && npm install fi ``` ### Technical Analysis The installation instructions clone the current default branch of an external Git repository without pinning a commit, verifying a cryptographic checksum, or validating a signed release. The reviewed artifact contains only documentation, so the remotely retrieved source code represents the effective implementation of the Skill. The subsequent `npm install` command processes dependencies selected by the downloaded project. Depending on the package configuration, it may also execute npm lifecycle scripts such as `preinstall`, `install`, or `postinstall`. Therefore, code that was not present during this audit can execute with the privileges of the user running the installation. This is principally remote payload retrieval and execution. It also creates a dependency supply-chain exposure because no reviewed lockfile or reproducible dependency set is included in the audited artifact. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or a dependency resolved by the downloaded project. 2. The attacker modifies the default branch or dependency configuration to include malicious source code or an npm lifecycle script. 3. An agent follows the bootstrap instructions in `SKILL.md`. 4. `git clone` retrieves the modified, unpinned content. 5. `npm install` installs dependencies and may execute attacker-controlled lifecycle scripts. 6. The malicious process runs under the installing user's account and c ...[truncated 824 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:28
Finding

Empty Skill Directory Variable Can Redirect Installation to the Filesystem Root

Content
View full analysis
/dev/null | head -1) if [ ! -d "$SKILL_DIR/src" ]; then git clone https://github.com/conflux-fans/conflux-wallet-skill.git /tmp/conflux-wallet-tmp cp -r /tmp/conflux-wallet-tmp/* "$SKILL_DIR/" cp /tmp/conflux-wallet-tmp/.gitignore "$SKILL_DIR/" 2>/dev/null rm -rf /tmp/conflux-wallet-tmp cd "$SKILL_DIR" && npm install fi ``` ### Technical Analysis The directory discovery command returns an empty string when neither expected installation directory exists. The script does not validate that `SKILL_DIR` is nonempty before appending paths or using it as a copy destination. When `SKILL_DIR` is empty: - `"$SKILL_DIR/src"` resolves to `/src`. - `"$SKILL_DIR/"` resolves to `/`. - The bootstrap condition tests whether `/src` exists rather than whether the intended Skill source directory exists. - The `cp` commands attempt to copy downloaded repository content into the filesystem root. Although quoting prevents shell word splitting, it does not prevent an empty variable from becoming an absolute root path when followed by `/`. This is a fail-open path-handling flaw. The code also uses a fixed temporary path, `/tmp/conflux-wallet-tmp`, instead of an unpredictable directory created with `mktemp`. That can cause collisions between concurrent runs and increases exposure to local filesystem manipulation, although no specific symlink exploit is confirmed from the reviewed documentation alone. ### Attack Path 1. The Skill is installed in a location other than the two hardcoded paths, or neither expected path exists. 2. The `ls -d` command produces no output, leaving `SKILL_DIR` empty. 3. The test checks `/src`; if that directory does not exist, the bo ...[truncated 1042 chars]
Remediation
View remediation
&2 exit 1 fi ``` 2. Resolve the destination to a canonical path and verify that it is beneath an explicitly approved workspace directory. 3. Explicitly reject dangerous destinations such as `/`, the user's home directory, or an unexpected symlink target. 4. Create the intended Skill directory explicitly rather than inferring it only from existing paths. 5. Use `mktemp -d` to create an unpredictable temporary directory and register a cleanup trap. 6. Enable strict shell behavior with `set -euo pipefail` in an actual installation script. 7. Copy into a staging directory first, validate the staged file tree, and then perform an atomic installation. 8. Avoid suppressing security-relevant errors with `2>/dev/null`; report discovery and copy failures clearly. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (12)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Although the deletion target is a temporary directory, the skill documents destructive shell usage with rm -rf during installation. In an agentic context, parameterized shell commands and environment-derived paths can become dangerous if variables are empty, altered, or misresolved, especially when combined with setup automation and code fetched from remote sources.

Content

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

git clone https://github.com/conflux-fans/conflux-wallet-skill.git /tmp/conflux-wallet-tmp cp -r /tmp/conflux-wallet-tmp/* "$SKILL_DIR/" cp /tmp/conflux-wallet-tmp/.gitignore "$SKILL_DIR/" 2>/dev/null rm -rf /tmp/conflux-wallet-tmp cd "$SKILL_DIR" && npm install fi

text

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Although the deletion target is a temporary directory, the skill documents destructive shell usage with rm -rf during installation. In an agentic context, parameterized shell commands and environment-derived paths can become dangerous if variables are empty, altered, or misresolved, especially when combined with setup automation and code fetched from remote sources.

Content

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

git clone https://github.com/conflux-fans/conflux-wallet-skill.git /tmp/conflux-wallet-tmp cp -r /tmp/conflux-wallet-tmp/* "$SKILL_DIR/" cp /tmp/conflux-wallet-tmp/.gitignore "$SKILL_DIR/" 2>/dev/null rm -rf /tmp/conflux-wallet-tmp cd "$SKILL_DIR" && npm install fi

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The command section documents direct fund transfer, swap, and arbitrary contract interaction commands without placing an explicit irreversible-action warning adjacent to those examples. In an agent-operated wallet context, that omission raises the risk that users or downstream agents execute value-moving or contract-calling operations without understanding they are final and can permanently lose funds.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 127)May include surrounding context.

│ └── contract.js # Generic contract interaction ├── SKILL.md # Agent skill definition └── package.json

Wallet: ~/.cfx-wallet.json (private key, chmod 600, never in project)

text

### Core Libraries

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The documented transaction flow says the wallet is loaded from state/wallet.json, implying a project-relative persisted wallet state, while the rest of the README says the secret lives in ~/.cfx-wallet.json. In an agent skill, confusion about persisted wallet state can lead to insecure handling, accidental inclusion in workspace state, backups, logs, or sync mechanisms, which is especially risky for private keys.

Content

Scanner excerpt · README.md (reported line 150)May include surrounding context.

text
User request
  → Load wallet from state/wallet.json
  → Create viem walletClient (with RPC failover)
  → Estimate gas (EIP-1559 smart estimation)
  → Build transaction
  → Sign locally with private key

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

The skill explicitly stores long-lived private keys locally, creating sensitive session persistence across runs. Persistent wallet credentials are especially dangerous in an agent environment because any later compromise of the host, skill code, dependencies, or prompts that trigger local file access can expose funds irreversibly.

Content

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

md
---
name: conflux-wallet-skill
description: Self-sovereign EVM wallet for AI agents. Use when the user wants to create a crypto wallet, check balances, send ETH or ERC20 tokens, swap tokens, or interact with smart contracts. Supports Base, Conflux eSpace,  Ethereum, Polygon, Arbitrum, and Optimism. Private keys stored locally — no cloud custody, no API keys required.
metadata: {"clawdbot":{"emoji":"💰","homepage":"https://github.com/conflux-fans/conflux-wallet-skill","requires":{"bins":["node","git"]}}}
---

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installation flow instructs the agent to clone remote code and run npm install, which can execute package lifecycle scripts and introduce arbitrary code execution outside the declared wallet actions. In a wallet skill that manages local private keys, this materially increases risk because fetched code or dependencies could access ~/.cfx-wallet.json or alter transaction behavior.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 136)May include surrounding context.

md
Returns: `{ "success": true, "address": "0x..." }`

The private key is stored at `~/.cfx-wallet.json` (chmod 600). **Never share this file.**

## Commands

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · README.md (reported line 160)May include surrounding context.

md
Returns: `{ "success": true, "address": "0x..." }`

The private key is stored at `~/.cfx-wallet.json` (chmod 600). **Never share this file.**

## Commands

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
Returns: `{ "success": true, "address": "0x..." }`

The private key is stored at `~/.cfx-wallet.json` (chmod 600). **Never share this file.**

## Commands

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The self-update flow performs git pull && npm install, which reintroduces unreviewed remote code and dependency script execution after initial setup. Because this skill handles wallet operations and local key material, an update mechanism can be abused to silently change transaction logic or exfiltrate secrets.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README gives conflicting wallet storage locations: most sections say the private key is stored in ~/.cfx-wallet.json, but the transaction flow says state/wallet.json. In a wallet skill, this can mislead operators into protecting, backing up, or auditing the wrong file path, increasing the chance of accidental key exposure or loss.

Content

No source excerpt is available for this finding.