Back to skill

Security audit

Use Usdc

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent USDC helper, but it asks users to handle raw wallet private keys and install unpinned packages for financial transactions, so it needs careful review before use.

Use this skill only in a controlled development environment or with low-value/test wallets unless you replace the raw private-key examples with a safer wallet, hardware signer, encrypted secret store, or scoped signing service. Pin and review dependencies before running generated code, keep mainnet use explicit, and verify recipient, chain, amount, USDC contract or mint, and approvals before confirming any transaction.

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:24
Finding
Unpinned Third-Party Dependencies## Vulnerability Details **File Location**: `SKILL.md`, lines 24 and 29 **Vulnerability Type**: Supply-chain exposure through unpinned npm dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm install viem ``` ```bash npm install @solana/kit @solana-program/token ws dotenv bs58 ``` ### Technical Analysis The installation commands do not specify exact dependency versions. The audited project also contains no package manifest or lockfile that would ensure deterministic dependency resolution. Consequently, running these commands at different times may install different direct and transitive package versions. npm lifecycle scripts belonging to those packages may execute during installation. This is particularly sensitive because the documented usage loads EVM and Solana private keys into the resulting Node.js process and constructs cryptocurrency transactions. If a listed package, its release process, or one of its transitive dependencies is compromised, malicious installation or runtime code could access wallet secrets, alter transaction recipients or amounts, or run arbitrary commands under the user's account. The audit found no evidence that the currently named packages are malicious. The vulnerability is the absence of reproducible, reviewed dependency pinning and integrity controls. ### Attack Path 1. An attacker compromises a listed npm package, its maintainer account, or a transitive dependency and publishes a malicious release. 2. A user follows the Skill's unversioned `npm install` instructions. 3. npm resolves the compromised release because no exact versions or lockfile constrain dependency selection. 4. Malicious code executes through an installation lifecycle script or when the dependency is imported. 5. The code reads wallet keys from environment variables or local key files, modifies transaction data, or executes commands with the user's operating-system privileges. 6. Stolen secrets can then be used to authorize transactions f ...[truncated 700 chars]
Remediation
## Remediation Suggestions 1. Add a reviewed `package.json` that declares all direct dependencies using exact versions rather than ranges or floating latest releases. 2. Generate and commit a lockfile, such as `package-lock.json`, to pin direct and transitive dependency versions and integrity hashes. 3. Instruct users and automation to run `npm ci` against the committed lockfile instead of unconstrained `npm install` commands. 4. Review transitive dependencies and npm lifecycle scripts before approving dependency updates. 5. Use automated dependency scanning and controlled update pull requests, with security and functionality review before lockfile changes are merged. 6. Consider disabling lifecycle scripts during installation with `npm ci --ignore-scripts` when compatible with the reviewed dependency set. 7. Run transaction tooling in a least-privileged environment with narrowly scoped secrets, restricted filesystem access, and wallet accounts containing only the funds required for the intended operation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger list contains very broad phrases such as 'check balance' and 'ATA' that can cause this skill to activate for requests outside narrowly intended USDC operations. In a financial skill that can guide token transfers and approvals, overbroad routing increases the chance of misapplied instructions, user confusion, or unsafe execution paths on the wrong asset or ecosystem.

Session Persistence

Medium
Category
Rogue Agent
Content
# USDC on EVM - Complete Implementation Guide

## Private Key Handling (Write Operations Only)

**For read operations (balance, allowance, verify):** No private key needed.
Confidence
83% confidence
Finding
The guidance recommends storing blockchain private keys in environment variables or persistent files for write operations. In agent or shared execution environments, these storage methods can expose long-lived signing material through process inspection, logs, shell history, backups, misconfigured permissions, or unintended reuse across sessions, enabling unauthorized USDC transfers or approvals.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# Store in ~/.ethereum/keys/testnet.key
echo "0x..." > ~/.ethereum/keys/testnet.key
chmod 600 ~/.ethereum/keys/testnet.key
```

```ts
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
# Store in ~/.ethereum/keys/testnet.key
echo "0x..." > ~/.ethereum/keys/testnet.key
chmod 600 ~/.ethereum/keys/testnet.key
```

```ts
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
# USDC on Solana - Complete Implementation Guide

## Private Key Handling (Write Operations Only)

**For read operations (balance, verify):** No private key needed.
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The guide recommends loading a Solana private key from an environment variable and provides copy-paste code that directly parses it, but it does not explicitly warn that this credential grants full control of funds and can be exposed through shell history, process inspection, logs, crash reports, or misconfigured deployment environments. In a wallet-transfer skill, normalizing this pattern without strong cautions increases the chance that users handle signing keys insecurely in production.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The file-based example instructs users to store an unencrypted wallet private key on disk and then load it directly into the process, but it does not clearly warn about theft risk from backups, filesystem compromise, malware, accidental commits, or multi-user systems. Because this skill enables value transfer, compromise of the file would allow unauthorized USDC transfers.

Static analysis

No suspicious patterns detected.