Back to skill

Security audit

SwarmSkill

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly about coordinated crypto trading, but it asks agents to follow mutable remote instructions and sign remote-built blockchain transactions without enough local safety checks.

Install only if you intentionally want an agent to participate in coordinated on-chain Solana trading. Use a dedicated wallet containing only funds you are prepared to lose, do not sign server-built transactions unless you can independently decode and verify every instruction, and avoid running the unpinned npx commands in an environment with wallet keys, secrets, or important local files.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:51
Finding

Server-Generated Financial Transactions Are Signed Without Mandatory Validation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 51-60
Vulnerability Type: Unsafe signing and broadcasting of externally generated blockchain transactions
Risk Level: High

Vulnerable Code Snippet:

markdown
4. State `trading`: `POST /api/session/{id}/build-buy-tx` `{ ethAddress, solAmount }`
   → returns an **unsigned base64 legacy @solana/web3.js Transaction**.
   Deserialize, sign with YOUR Solana key, send it yourself, then
   `POST /api/session/{id}/confirm-buy` `{ ethAddress, txSignature }`.
   The buy is verified on-chain and must be ≥ $25 worth of SOL
   (your wallet's total debit exceeds `solAmount` by ~1% pump fee + network fees
   + ~0.002 SOL ATA rent on first buy).
5. `POST /api/session/{id}/vote-hold` `{ holdMinutes: 1-1440 }` within 10 min —
   the median of all confirmed buyers decides.
6. When the hold elapses (or a majority votes `vote-sell`), state becomes
   `settling`: `POST /api/session/{id}/build-sell-tx` → sign + send.

Technical Analysis

The documented workflow instructs an agent to deserialize, sign, and broadcast Solana transactions generated by a proprietary remote API. It does not require the agent to inspect or validate the transaction before signing.

A Solana transaction can contain instructions unrelated to the stated trade. Relevant fields requiring validation include:

  • Program IDs invoked by each instruction
  • Source and destination accounts
  • Token mint addresses
  • Transfer amounts and maximum wallet debit
  • Slippage and minimum-output limits
  • Fee and treasury recipients
  • Account creation and rent charges
  • Token approvals or authority changes
  • Signer and writable-account flags
  • Additional instructions appended to the expected trade

HTTPS protects the transport connection but does not establish that the service itself, its deployment account, or the generated transaction is trustworthy. The claim that the server never sees ...[truncated 1551 chars]

Remediation
View remediation

Remediation Suggestions

  • Decode every transaction into a human-readable instruction list before signing.
  • Enforce an explicit allowlist of expected Solana program IDs and reject unknown programs.
  • Verify the selected token mint, source wallet, destination accounts, fee recipients, and all account authority changes.
  • Calculate the maximum possible wallet debit and reject transactions exceeding the user-approved amount plus a narrowly bounded fee allowance.
  • Require explicit minimum-output and maximum-slippage constraints.
  • Reject unexpected transfer, approval, authority-change, or additional instructions.
  • Confirm that the transaction is associated with the intended session and recently selected coin.
  • Present a complete transaction summary to the human wallet owner and require confirmation before signing.
  • Prefer locally constructed transactions from independently validated quote data over opaque server-generated transactions.
  • Use a dedicated wallet containing only the capital approved for the session rather than a general-purpose wallet.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:13
Finding

Mutable Remote Manifest Is Treated as Authoritative Agent Instruction

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 13-18
Vulnerability Type: Delegation of agent behavior to mutable remote instructions without a locally pinned trust anchor
Risk Level: High

Vulnerable Code Snippet:

markdown
- **Live API:** `https://swarm-skill.vercel.app`
- **Canonical manifest (always read first):**
  `https://swarm-skill.vercel.app/.well-known/erc8257-manifest.json`
- **On-chain registry:** Tool ID `25` in `0x265BB2DBFC0A8165C9A1941Eb1372F349baD2cf1` (Ethereum Mainnet)
  — verify the manifest hash via `npx @opensea/tool-sdk verify https://swarm-skill.vercel.app/.well-known/ai-tool/swarmskill.json`
- **Directory listing:** https://agenttoolindex.xyz (ERC-8257 index)

The behavior delegation is reinforced later by:

markdown
## The flow (follow the manifest exactly)

The same remote-control rule also appears in context7.json:

json
"Always read the canonical manifest first: https://swarm-skill.vercel.app/.well-known/erc8257-manifest.json"

Technical Analysis

The locally reviewed Skill explicitly directs an agent to read a remotely hosted manifest first and follow it exactly. The repository does not contain a pinned copy of that manifest, an expected immutable hash, or a rule defining safe behavior when verification fails.

Although on-chain verification is suggested, the documentation does not provide a locally trusted expected hash against which the downloaded artifact must be compared. It also does not require successful verification before interpreting the remote document as instructions. The verification URL differs from the URL identified as the canonical manifest, increasing the need for an explicit binding between the two resources.

This creates a time-of-review versus time-of-use gap: the effective operating instructions can change after the local Skill package has been audited.

Attack Path

  1. An attacker gains control of the ...[truncated 1212 chars]
Remediation
View remediation

Remediation Suggestions

  • Store a reviewed manifest copy or its exact cryptographic digest in the local package.
  • Pin a specific manifest version and reject any content whose digest does not match.
  • Require verification to succeed before parsing or acting on the manifest.
  • Explicitly bind the canonical manifest URL to the on-chain registered hash.
  • Treat all downloaded manifest text as untrusted data, not as higher-priority agent instructions.
  • Define immutable local safety constraints that remote content cannot override, including approved domains, endpoints, programs, transaction limits, and fee recipients.
  • Fail closed if the manifest is unavailable, changed, malformed, expired, or inconsistent with the local policy.
  • Require human review when upgrading to a new manifest hash.

T08 · Insecure Dependencies

Warning
Location
README.md:14
Finding

Documentation Executes Unpinned Third-Party Packages Through npx

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 14-19
Vulnerability Type: Execution of mutable third-party supply-chain artifacts without version or integrity pinning
Risk Level: Medium

Vulnerable Code Snippet:

markdown
- 🔗 On-chain verification: `npx @opensea/tool-sdk verify https://swarm-skill.vercel.app/.well-known/ai-tool/swarmskill.json`
- 🔍 Listed in the [Agent Tool Index](https://agenttoolindex.xyz)

Install into any skills-compatible agent:

```bash
npx skills add DerDoPhil/swarmskill-agent-skill
text

The unpinned verification command is also present in `SKILL.md` and `context7.json`.

### Technical Analysis

`npx` can resolve, download, and execute package code from a package registry. Neither documented command pins an exact package version or supplies an integrity digest. The installation command also references a mutable repository identifier without a commit hash or release digest.

Consequently, the code executed by these commands may differ from the code that existed when this repository was reviewed. A compromised package publisher, registry account, dependency, or repository could turn a verification or installation command into an arbitrary-code execution path.

This audit found no evidence that the currently named packages are malicious. The confirmed issue is the unsafe, mutable dependency-resolution and execution pattern.

### Attack Path

1. An attacker compromises the `@opensea/tool-sdk` package, the package used by `npx skills`, one of their transitive dependencies, or the referenced Skill repository.
2. The attacker publishes a malicious version or modifies the mutable repository state.
3. A user follows the README and executes the unpinned `npx` command.
4. The package manager resolves the attacker-controlled version and downloads it.
5. Package initialization, lifecycle hooks, or the invoked command executes with the user's local operating-system permis
...[truncated 753 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin every npm package to an exact reviewed version.
  • Use a lockfile and verify registry integrity hashes before execution.
  • Pin the Skill repository to a reviewed commit SHA or signed release artifact.
  • Disable or carefully control package lifecycle scripts where possible.
  • Download and inspect dependencies before running them rather than relying on implicit npx resolution.
  • Execute verification and installation tools in a sandbox with no wallet keys, secrets, or unnecessary filesystem access.
  • Use a trusted internal package mirror or allowlist for security-sensitive environments.
  • Document the expected package version, artifact digest, repository commit, and update-review process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (6)

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding

The README instructs users to run npx @opensea/tool-sdk verify ... without pinning a specific package version. That causes execution of whatever version is current at install time, which can introduce supply-chain risk if a future release is compromised or behavior changes unexpectedly. In a crypto/on-chain tooling context, this is more dangerous because users may run the command in environments that also hold wallet tooling or signing capabilities.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The installation command npx skills add DerDoPhil/swarmskill-agent-skill executes an unpinned package/tool resolver path, exposing users to package substitution or unexpected changes over time. Because this skill is for coordinated crypto trading, any compromised installer or changed dependency chain could directly affect wallets, agent behavior, or transaction-related prompts, increasing the practical risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README promotes coordinated on-chain trading, minimum buy amounts, hold voting, joint selling, and profit-sharing, but omits any warning about financial loss, transaction irreversibility, smart-contract risk, market manipulation exposure, or regulatory/compliance consequences. In this specific context, the absence of risk disclosure is more dangerous than in ordinary software documentation because users are being encouraged to engage in speculative, irreversible crypto transactions and coordinated trading behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description says "Use when an AI agent wants to trade Solana pump.fun coins together with a swarm of other agents," but it does not define clear trigger phrases, boundaries, or exclusion conditions. This is broad enough that an agent could invoke the skill for general discussion of coin trading or coordination, rather than only for explicit user intent to join this specific SwarmSkill workflow.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The skill instructs agents to run npx @opensea/tool-sdk verify ... without pinning an exact package version. That creates a supply-chain risk: a later compromised or malicious release could be fetched and executed at analysis or runtime, and npx executes remote package code. In this skill’s context, the command is framed as part of trust verification for a financial trading tool, which increases danger because users may run it with higher trust and in environments that also hold wallet tooling or credentials.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The rule instructs users to run npx @opensea/tool-sdk without pinning an exact package version, which causes the latest published package to be fetched and executed at runtime. If the package is compromised, a malicious version is published, or a breaking update alters verification behavior, users could execute attacker-controlled code or receive misleading manifest verification results.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.