Back to skill

Security audit

Uniswap Self Funding Setup

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent about setting up crypto-based agent funding, but it gives agents broad financial authority with weak transaction-by-transaction user control.

Install only from a pinned, verified version. Before using this skill, require explicit approval for every wallet funding, token deployment, liquidity lock, approval, treasury automation, and mainnet registration transaction, and lower the spending limit to a task-specific amount.

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
README.md:10
Finding
Unpinned Third-Party Installation Commands Permit Supply-Chain Code Substitution<![CDATA[ ## Vulnerability Details **File Location**: `README.md:10-18` **Vulnerability Type**: Unpinned remote dependencies and mutable installation sources **Risk Level**: High ### Vulnerable Code ```markdown Install into Claude Code or Cursor with: ```bash npx skills add https://github.com/wpank/Agentic-Uniswap/tree/main/.ai/skills/self-funding-setup ``` Or via Clawhub: ```bash npx clawhub@latest install self-funding-setup ``` ``` ### Technical Analysis The documented installation procedures execute packages resolved through `npx` without pinning them to audited, immutable versions. The second command explicitly selects `clawhub@latest`, allowing the npm registry to provide a different package version each time the command is run. The first command invokes the unversioned `skills` package and installs skill content from a mutable GitHub branch path rather than a specific commit SHA. Consequently, the effective code and skill instructions installed on a user's system can change after this audit. The risk is not limited to the audited Markdown files: `npx` may download and execute package lifecycle or command code supplied by the package registry. The remote repository content may also be replaced without changing the command shown in the README. ### Attack Path 1. An attacker compromises the npm account, package publication process, GitHub repository, or a maintainer account associated with one of the referenced components. 2. The attacker publishes a malicious version under the package's current `latest` tag, changes the unpinned `skills` package, or modifies the repository branch referenced by the URL. 3. A user follows the README and runs one of the documented `npx` commands. 4. `npx` resolves and executes the attacker's updated package code under the user's local account. 5. The malicious installer can modify project files, steal locally accessible credentials, alter installed agent instructions, or execute other commands available to that user ...[truncated 706 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every npm package to an exact audited version, for example: ```bash npx clawhub@X.Y.Z install self-funding-setup ``` 2. Pin GitHub-hosted content to a full commit SHA rather than a mutable branch: ```text https://github.com/wpank/Agentic-Uniswap/tree/<full-commit-sha>/.ai/skills/self-funding-setup ``` 3. Document SHA-256 checksums or signed release provenance for downloaded artifacts. 4. Avoid executing packages directly from the network where practical. Download the package, verify its integrity and signature, inspect its contents, and then install it. 5. Use npm lockfiles and integrity metadata for any maintained dependency set. 6. Enable registry account protections, including multi-factor authentication, provenance attestations, and restricted publication tokens. 7. Add automated monitoring for ownership changes, unexpected releases, and modifications to referenced repository content. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:133
Finding
Irreversible Financial Operations Lack an Enforced User Confirmation and Simulation Gate<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:133-191`, with related automated transaction instructions at `SKILL.md:229-247` and safeguard claims at `SKILL.md:431` **Vulnerability Type**: Unsafe authorization of high-impact financial operations **Risk Level**: High ### Vulnerable Code ```text Provision an agent wallet for self-funding operations: - Provider: {walletProvider} - Chains: {chains} - Environment: {environment} - Spending limit: $10,000/day (default for self-funding agents) - Initial funding: {initialFunding} (or 2x estimated gas need) This wallet will be used for: - Token deployment (if enabled) - Treasury management (fee conversion, LP) - x402 payment settlement - General agent operations Configure appropriate spending policies for a self-funding agent. ``` ```text Deploy an agent token for self-funding: - Token name: {tokenName} - Token symbol: {tokenSymbol} - Chain: {chains[0]} (primary chain) - Wallet: {wallet address from Step 1} - Paired token: WETH - Hooks: anti-snipe (2-block delay) + revenue-share (5%) - LP lock: 10 years - Initial liquidity: {derive from initialFunding or suggest minimum} This token is part of a self-funding agent setup. The revenue-share hook directs 5% of swap fees to the agent wallet for treasury management. ``` The treasury stage additionally instructs: ```text Configure: - Auto-convert non-stablecoin earnings to USDC - Conversion threshold: $10 minimum - DCA enabled for large conversions - Circuit breaker: halt if treasury drops below $100 - Operating reserve: 30 days of estimated burn rate ``` The stated safeguard is: ```markdown - **Token deployment is irreversible.** Once a token is deployed and the pool is created, it cannot be undone. The skill simulates everything via safety-guardian before execution, but make sure the token name, symbol, and parameters are correct before confirming. ``` ### Technical Analysis The workflow authorizes delegated agents to provision and fund a wallet, ...[truncated 3069 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Add a mandatory, fail-closed user confirmation immediately before every state-changing transaction. 2. Present a complete transaction review containing: - Network name and numeric chain ID - Sender and recipient addresses - Target contract address - Native and token amounts - Approval spender, amount, and expiration - Pool assets, fee tier, hooks, and hook addresses - Initial liquidity and lock duration - Expected gas cost and protocol fees - Slippage and minimum received amounts - Decoded calldata or an equivalent human-readable action summary 3. Require an explicit confirmation phrase tied to the displayed transaction details. General confirmation of the overall workflow must not authorize later transactions with previously undisclosed parameters. 4. Add an actually available simulation or safety tool to `allowed-tools`, require successful simulation before confirmation, and abort if simulation is unavailable or inconclusive. 5. Default development workflows to testnets. Require a separate explicit opt-in for mainnet operations. 6. Remove the `$10,000/day` default. Use deny-by-default policies and require the user to select a task-appropriate limit. 7. Prefer exact per-transaction allowances over unlimited approvals. Restrict spenders to verified contract addresses and revoke approvals when no longer needed. 8. Do not derive initial liquidity automatically for production transactions. Require an exact amount from the user and display its fiat-equivalent estimate. 9. Validate token, pool, registry, hook, and facilitator addresses against chain-specific allowlists or independently verified deployment registries. 10. Add transaction-stage cancellation and recovery procedures, while clearly identifying operations that cannot be rolled back after confirmation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The README instructs users to run `npx skills add ...` without pinning an exact package version, which means the package resolved at execution time could change or be replaced with a malicious release. Because `npx` fetches and executes code, this creates a supply-chain execution risk for anyone following the installation instructions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The command `npx clawhub@latest install self-funding-setup` explicitly tracks the latest version, causing users to execute whatever code is most recently published. In a security-sensitive skill that configures wallets, tokens, treasury, identity, and payments, executing an unpinned installer increases supply-chain compromise risk and could lead to credential theft or malicious setup actions.

External Model or Provider Selection

Medium
Category
Excessive Agency
Content
registers identity on ERC-8004, and sets up x402 micropayments. Use when
  user wants to make their agent self-funding, earn and manage its own
  revenue, or configure autonomous agent operations end-to-end.
model: opus
allowed-tools:
  - Task(subagent_type:wallet-provisioner)
  - Task(subagent_type:token-deployer)
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill orchestrates real wallet provisioning, funding, token deployment, and Ethereum mainnet identity registration, but it does not require an explicit user confirmation or prominent warning immediately before irreversible or value-spending steps. In a composite workflow like this, users may trigger multiple on-chain actions and incur real costs without clearly understanding that funds will be moved and irreversible transactions will occur.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The skill instructs direct creation of repository files such as .uniswap/x402-config.json and .well-known/x402-manifest.json without clearly warning the user that local project files will be modified. While lower risk than on-chain spending, silent writes can alter deployment behavior, expose payment endpoints, or commit unintended configuration into source control.

Static analysis

No suspicious patterns detected.