Back to skill

Security audit

Credit Mastery

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly documentation for the Swarms API, but it normalizes sending Solana wallet private keys to remote services and enables broad autonomous file-tool configurations.

Review carefully before installing. Do not provide a funded or primary Solana wallet private key to these workflows; prefer local signing, wallet adapters, hardware wallets, or a dedicated low-balance test wallet. Pin and isolate any SDK install, restrict autonomous agents to the minimum tool allowlist, and avoid selected_tools="all" unless file access is intentionally sandboxed and reversible.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

other

Error
Location
SKILL.md:96
Finding

Solana Wallet Private Keys Transmitted to Remote Services

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:96-109; references/marketplace.md:25-38; references/atp-protocol.md:5-17, 45-57
Vulnerability Type: Sensitive credential disclosure to remote services
Risk Level: Critical

Vulnerable Code

SKILL.md:96-109

python
### 3. Token Launch (Solana)

```python
payload = {
    "name": "My Agent Token",
    "description": "Agent description",
    "ticker": "MAG",
    "private_key": "[1,2,3,...]"  # Solana wallet private key
}

response = requests.post(
    "https://swarms.world/api/token/launch",
    headers={"Authorization": "Bearer API_KEY", "Content-Type": "application/json"},
    json=payload
)
# Returns: token_address, pool_address, listing_url
# Cost: ~0.04 SOL
text

`references/marketplace.md:25-38`

```markdown
## Token Launch API

**POST** `https://swarms.world/api/token/launch`

Creates agent listing + launches Solana token in single request.

### Required Fields
| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Agent display name (min 2 chars) |
| `description` | string | Agent description |
| `ticker` | string | Token symbol (1-10 chars, letters+numbers) |
| `private_key` | string | Solana wallet key (JSON array, base64, or base58) |

references/atp-protocol.md:5-17

markdown
## Components
1. **Settlement Service (Facilitator)** — handles usage parsing, payment calculation, blockchain transactions
   - URL: `https://facilitator.swarms.world`
2. **Middleware** — FastAPI middleware intercepting API responses, encrypting until payment confirmed
3. **Client** — user-facing client for ATP-protected endpoints

## Request Flow
1. Client sends request with wallet private key in header
2. Endpoint processes, returns response with usage data
3. Middleware encrypts response, sends payment request
4. Settlement service calculates cost, creates split transacti
...[truncated 2745 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove all API fields and HTTP headers that accept raw wallet private keys.
  • Construct transactions on the service, return unsigned transaction data, and require the user to sign locally.
  • Submit only signed transaction bytes or signatures to the remote service.
  • Integrate established Solana wallet adapters or hardware-wallet approval flows.
  • Ensure the remote service cannot substitute transaction contents after user review.
  • Display transaction recipients, amounts, fees, and instructions before requesting a signature.
  • Until the protocol is redesigned, explicitly warn users not to use funded or primary wallets and require isolated, low-balance wallets.
  • Redact wallet credentials from request logs, traces, exception reports, analytics, and monitoring systems.
  • Rotate any key that has previously been supplied to these endpoints and transfer remaining assets to a newly generated wallet.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:15
Finding

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:15
Vulnerability Type: Uncontrolled third-party dependency resolution
Risk Level: Medium

Vulnerable Code

markdown
- **Python SDK:** `pip install swarms-client`

Technical Analysis

The installation instruction resolves and installs the latest package version available under the swarms-client name. It does not specify a reviewed version, cryptographic hash, lock file, or package provenance requirement.

This allows the effective code installed by users to change after the Skill has been audited. If the package account, publishing pipeline, or a future release is compromised, installation or runtime code may execute with the user's local privileges. The risk is particularly significant because the package is intended to process API credentials, prompts, and potentially payment-related data.

No evidence was found that the package is currently malicious. The vulnerability is the absence of controls that bind installation to a known, reviewed artifact.

Attack Path

  1. An attacker compromises the package maintainer account, release pipeline, or package distribution channel.
  2. The attacker publishes a malicious version using the expected package name.
  3. A user follows pip install swarms-client without a version constraint.
  4. Package resolution selects the malicious release.
  5. Malicious installation or runtime code executes in the user's environment.
  6. The package may access credentials, files, prompts, or network resources available to that process.

Impact Assessment

Exploitation could provide code execution with the privileges of the user or automation account performing the installation. The accessible scope may include environment variables, API keys, project files, prompts, and wallet material handled in the same environment. System-wide impact is possible if installation is performed with elevated privileges.

Remediation
View remediation

Remediation Suggestions

  • Pin the SDK to a specifically reviewed version, for example swarms-client==X.Y.Z.
  • Publish and verify cryptographic hashes using a requirements file and pip install --require-hashes.
  • Use a lock file generated from reviewed dependency versions, including transitive dependencies.
  • Document the authoritative package repository, publisher identity, and release-verification process.
  • Prefer signed releases and verify package provenance where supported.
  • Install the package inside a dedicated virtual environment or container with minimal filesystem and network access.
  • Avoid privileged installation and prevent the runtime from accessing wallet keys or unrelated credentials.
  • Establish a controlled dependency-update process that includes security review before version changes.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/sub-agents.md:5
Finding

Autonomous Agent Mode Permits Excessive Filesystem Capabilities

Content
View full analysis

Vulnerability Details

File Location: references/sub-agents.md:5-7, 67-72
Vulnerability Type: Excessive tool permissions in autonomous mode
Risk Level: Medium

Vulnerable Code

references/sub-agents.md:5-7

markdown
## Requirements
- `max_loops`: `"auto"` (enables autonomous agent loop)
- `selected_tools`: `"all"` or include `"create_sub_agent"` and `"assign_task"`
- Uses standard `/v1/agent/completions` endpoint

references/sub-agents.md:67-72

markdown
## Available Internal Tools (when max_loops="auto")
- `create_plan` — planning
- `think` — reasoning
- `subtask_done` — mark subtask complete
- `complete_task` — mark task complete
- `respond_to_user` — send response
- `create_file` / `update_file` / `read_file` / `list_directory` / `delete_file` — file ops
- `create_sub_agent` / `assign_task` — delegation
- `run_bash` — NOT permitted (security)

Technical Analysis

The declared purpose of this configuration is to create sub-agents and assign work. Those operations require only a narrow set of planning and delegation tools. The recommendation that selected_tools may be set to "all" grants unrelated filesystem read, creation, modification, listing, and deletion capabilities.

Although shell execution is explicitly prohibited, unrestricted filesystem operations can still expose sensitive information, corrupt project data, or delete files. Autonomous agents can be influenced by malicious or untrusted content included in user tasks, retrieved documents, marketplace prompts, or delegated results. Giving such an agent broad tools increases the consequences of prompt injection and erroneous planning.

This configuration violates least privilege because filesystem access is not required for basic sub-agent delegation.

Attack Path

  1. A user configures a coordinator with max_loops="auto" and selected_tools="all" as permitted by the documentation.
  2. The coor ...[truncated 1122 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove "all" from the recommended sub-agent delegation configuration.
  • Use an explicit allowlist containing only the tools required for the workflow, such as think, create_plan, create_sub_agent, and assign_task.
  • Disable filesystem tools by default for autonomous agents.
  • If file access is essential, restrict it to a dedicated per-task workspace with canonicalized paths and deny traversal or symbolic-link escapes.
  • Separate read, write, and delete permissions rather than granting them as a group.
  • Require explicit user confirmation before file deletion, overwrite, or disclosure outside the workspace.
  • Treat task text, retrieved content, marketplace prompts, and sub-agent output as untrusted input.
  • Add policy enforcement outside the language model so prompt content cannot expand the tool allowlist.
  • Record and review autonomous tool calls while redacting sensitive file contents from logs.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill includes examples that send an API key to external services and, more critically, transmit a Solana private key in a request payload without an explicit warning about wallet-secret handling. In an agent-skill context, normalized examples can encourage unsafe copy-paste behavior, leading to credential compromise or irreversible wallet loss if users expose real secrets.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Describing transmission of a wallet private key in request headers without a strong warning is unsafe because readers may implement it verbatim, turning documentation into a blueprint for exfiltrating the most sensitive credential in the system. In this skill context, the danger is amplified because it targets AI agent payment automation, where developers may deploy middleware broadly and unintentionally send spend authority for real blockchain wallets to third-party endpoints or infrastructure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This is a markdown file, so vague-trigger review applies. The description says to use the skill for "building any multi-agent orchestration pipeline" and lists many broad creation/integration scenarios, but it does not define concrete trigger phrases, boundaries, or exclusion conditions. That breadth makes accidental invocation more likely for general AI-building requests.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"task": "Your task here"
}

response = requests.post(
    "https://api.swarms.world/v1/agent/completions",
    headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"task": "Your task here"
}

response = requests.post(
    "https://api.swarms.world/v1/agent/completions",
    headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"task": "Your task here"
}

response = requests.post(
    "https://api.swarms.world/v1/agent/completions",
    headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
"task": "Your task here"
}

response = requests.post(
    "https://api.swarms.world/v1/swarm/completions",
    headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This duplicate finding captures the same token-launch request that includes a raw Solana private key in the JSON body. Sending wallet private keys to a remote service creates immediate risk of asset theft, impersonation, and irreversible compromise if intercepted, logged, or mishandled by the service.

Content

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

md
"private_key": "[1,2,3,...]"  # Solana wallet private key
}

response = requests.post(
    "https://swarms.world/api/token/launch",
    headers={"Authorization": "Bearer API_KEY", "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This duplicate finding captures the same token-launch request that includes a raw Solana private key in the JSON body. Sending wallet private keys to a remote service creates immediate risk of asset theft, impersonation, and irreversible compromise if intercepted, logged, or mishandled by the service.

Content

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

md
"private_key": "[1,2,3,...]"  # Solana wallet private key
}

response = requests.post(
    "https://swarms.world/api/token/launch",
    headers={"Authorization": "Bearer API_KEY", "Content-Type": "application/json"},
    json=payload

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Health Check

text
GET https://api.swarms.world/health

Conversation History

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

Health Check

text
GET https://api.swarms.world/health

Conversation History

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/architecture.md (reported line 32)May include surrounding context.

Health Check

text
GET https://api.swarms.world/health

Conversation History

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The documentation explicitly instructs clients to send a wallet private key in an HTTP header, which is highly sensitive secret material that can be exposed via reverse proxies, application logs, tracing middleware, crash reports, browser tooling, or upstream services. This directly contradicts the stated best practice to never log or persist private keys, and normalizing this pattern in an agent/payment skill makes accidental credential compromise and irreversible theft of on-chain funds much more likely.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/atp-protocol.md (reported line 56)May include surrounding context.

)

response = await client.post( url="https://api.example.com/v1/chat", json={"message": "Hello!"} )

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation instructs users to send a Solana private key to a remote API as part of a normal workflow, but provides no warning about the extreme sensitivity of that secret or safer alternatives. In an agent-orchestration skill context, this is especially dangerous because downstream agents or users may automate the request, log the key, persist it in configs, or expose it to third-party systems, leading to irreversible wallet compromise and asset theft.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/streaming.md (reported line 38)May include surrounding context.

md
"task": "Your task"
}

response = requests.post(
    f"{BASE_URL}/v1/agent/completions",
    headers=headers, json=payload, stream=True
)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation advertises built-in file manipulation capabilities, including create, update, and delete operations, but provides no warning about data loss, scope restrictions, or approval requirements before modifying files. In a sub-agent delegation context, this is more dangerous because autonomous coordinator and child agents can amplify unintended or unsafe file actions across multiple tasks without clear user awareness.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.