Back to skill

Security audit

Trade

Security checks for vulnerabilities and agentic risk

Overview

This skill is clearly for crypto token trading, but it gives an agent real trading authority through an unpinned npm command and lacks strong transaction-confirmation guidance.

Review before installing. Only use this with a pinned and trusted version of the trading CLI, in a wallet environment with limited funds and permissions, and require a manual confirmation step showing the exact trade details before any transaction is submitted.

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

Error
Location
SKILL.md:6
Finding
Mutable npm Dependency Executed During Wallet and Trading Operations## Vulnerability Details **File Location**: `SKILL.md`, lines 6-13 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: High ### Vulnerable Code ```yaml allowed-tools: ["Bash(npx awal@latest status*)", "Bash(npx awal@latest trade *)", "Bash(npx awal@latest balance*)"] ``` ```bash npx awal@latest status ``` The same mutable `awal@latest` package reference is used throughout the file for wallet status, balance, and token-trading commands. ### Technical Analysis The skill executes the third-party `awal` npm package through `npx` using the mutable `latest` distribution tag. No exact package version, cryptographic integrity value, lockfile, or locally reviewable implementation is provided. Because npm distribution tags can be changed after this skill has been audited, the code executed by these commands may differ from the code that existed during review. A compromise of the package publisher, npm account, package dependencies, or publishing pipeline could cause subsequent skill invocations to download and run attacker-controlled code. This is particularly sensitive because the dependency is used for authenticated wallet operations and token swaps. The skill itself contains no evidence of credential harvesting, transaction-address substitution, persistence, or other directly malicious behavior; the risk arises from trusting a mutable executable dependency in a financial context. ### Attack Path 1. An attacker compromises the `awal` package publisher, its npm credentials, or a transitive dependency and publishes a malicious release. 2. The malicious release is assigned to the npm `latest` tag. 3. A user invokes the skill to check wallet status, inspect a balance, or trade tokens. 4. The agent executes an allowed command such as `npx awal@latest status` or `npx awal@latest trade ...`. 5. `npx` resolves and executes the attacker-controlled package release. 6. The malicious package runs w ...[truncated 914 chars]
Remediation
## Remediation Suggestions 1. Replace every `awal@latest` reference with an exact, security-reviewed version, such as `awal@X.Y.Z`. 2. Manage the CLI as a declared project dependency using a lockfile rather than downloading a mutable release at invocation time. 3. Enforce package integrity verification through the package manager lockfile, verified registry metadata, and trusted package provenance. 4. Review the pinned package and its transitive dependencies before each upgrade. Do not automatically advance to new releases. 5. Run the CLI in a restricted environment with only the filesystem, network, environment-variable, and wallet permissions required for the requested operation. 6. Require explicit user confirmation immediately before transaction submission. The confirmation should show the source and destination token addresses, exact amount, network, slippage, recipient, expected output, and relevant fees. 7. Where supported, separate read-only wallet status and balance operations from transaction-signing capabilities. 8. Restrict outbound network access to documented and trusted registry, RPC, and API endpoints, and log package versions and transaction parameters for security review.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (13)

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The repeated manifest alert is still valid because each allowed-tools reference inherits the same unpinned dependency risk. Since this skill is user-invocable, exploitation could be triggered by normal user requests rather than an unusual administrative path.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The manifest repeatedly references `npx awal@latest`, which means the exact code executed is not stable or reviewable. Because this skill is user-invocable and tied to token swaps, the mutable dependency significantly increases the blast radius of any supply-chain compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The instructions tell the model to use `npx awal@latest trade`, again executing unpinned code from the npm registry. In context, that code is entrusted with wallet state and swap execution, so a malicious package update could steal credentials, alter trade parameters, or trigger unauthorized transactions.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill facilitates real token swaps but does not prominently warn that trades are irreversible and involve actual funds, fees, slippage, and market risk. In this context, missing user-safety messaging is dangerous because it can lead users or the agent to perform financially harmful actions without clear informed consent, especially when combined with simple examples like buying or converting tokens.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The command syntax section normalizes use of `npx awal@latest`, reinforcing insecure operational behavior. Repeated documentation of an unpinned executable increases the likelihood that both the agent and human operators will run mutable third-party code without review.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
Another invocation path uses the same unpinned package pattern. Even though this line discusses amount formats, any operational example that users or agents may copy/paste can trigger the same supply-chain execution risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The first trade example uses `npx awal@latest`, exposing users and agents to remote code execution from a mutable package at the point of initiating a real token swap. Because swaps are irreversible and involve funds, compromise here could directly cause financial loss.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This example repeats the unpinned `@latest` execution pattern. In a financial workflow, normalizing mutable dependency execution is more dangerous than in a read-only utility because the tool can influence pricing, recipients, approvals, and transaction submission.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The atomic-units example still relies on `npx awal@latest`, preserving the same supply-chain risk. If the package were compromised, the example could lead to arbitrary code execution and mis-handled trades despite appearing to be a harmless formatting illustration.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
This ETH-to-USDC example invokes unpinned code from npm in a privileged financial context. The combination of wallet access and real asset movement makes any supply-chain compromise materially dangerous.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The slippage example continues the pattern of mutable package execution. A compromised CLI could silently override user-provided slippage, route funds maliciously, or exfiltrate authentication data.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The contract-address example is especially sensitive because arbitrary token addresses are involved, yet the command still relies on unpinned remote code. This compounds risk: a malicious or compromised package could abuse both flexible token selection and transaction authority.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The JSON-output example still fetches and runs `@latest`, so even non-transactional-seeming example variants preserve the same runtime supply-chain exposure. In aggregate, the skill consistently encourages insecure execution of mutable code.

Static analysis

No suspicious patterns detected.