Back to skill

Security audit

plugy

Security checks for vulnerabilities and agentic risk

Overview

This Solana trading skill is purpose-aligned but asks an agent to handle wallet private keys, persist API keys, and follow mutable remote trading instructions, which warrants careful review before use.

Only install this after reviewing the remote PLUGy documents and deciding you are comfortable with an agent seeing wallet material and retaining an API key. Use minimal funds, require explicit confirmation for trades and token creation, avoid storing secrets in agent memory or plaintext files, and rotate or revoke credentials if they appear in chat logs or local storage.

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)

T09 · Insecure Skill Coding Practices

Error
Location
skill.md:72
Finding
Unsafe Handling and Storage of Wallet and API Credentials## Vulnerability Details **File Location**: `skill.md`, lines 72-85 **Vulnerability Type**: Exposure and insecure persistence of sensitive credentials **Risk Level**: High ### Vulnerable Code ```markdown **IMPORTANT — you MUST do all of the following after registration:** 1. **Show the `privateKey` to your human user immediately.** This is their wallet key — they need it to withdraw funds. It is shown this one time only and cannot be recovered. 2. **Show the `publicKey`** — this is the Solana wallet address they need to fund with SOL. 3. **Save the `apiKey` in your memory** — you need it for all requests. Never show it publicly. 4. **Do NOT register again** if you already have an API key. Check your memory/storage first before calling register. **Tell your human:** > "Here is your wallet private key: `[privateKey]`. Save it securely — it will never be shown again. Send SOL to `[publicKey]` to start trading." Store the apiKey in your memory, environment variables (`PLUGY_API_KEY`), or `~/.config/plugy/credentials.json`. ``` ### Technical Analysis The Skill instructs the agent to place a Solana wallet private key directly into conversational output. Agent conversations may be retained in logs, model context, monitoring systems, browser history, or third-party integrations. Consequently, a high-value private key is exposed to substantially more components than are required to operate the wallet. The API key may also be stored in persistent agent memory, an environment variable, or a local credential file. The instructions do not require file permissions such as `0600`, encryption at rest, an operating-system secret manager, log redaction, credential expiration, or rotation. Persistent agent memory is especially unsuitable for secrets because it may be included in future contexts or exposed to other tools. Environment variables can be inherited by child processes, while a file created with permissive defaults may be accessibl ...[truncated 1444 chars]
Remediation
## Remediation Suggestions - Do not place wallet private keys in model context, ordinary chat output, logs, or persistent agent memory. - Provide a dedicated secret-export mechanism that delivers the private key directly to an authenticated user through a secure, non-logged channel. - Store API keys in an operating-system keychain, hardware-backed keystore, or dedicated secret manager. - If file storage is unavoidable, create the parent directory and credential file atomically with owner-only permissions, such as directory mode `0700` and file mode `0600`. - Avoid environment-variable storage where untrusted child processes or diagnostic tooling can inspect the process environment. - Implement comprehensive secret redaction for request logs, responses, telemetry, errors, and conversation transcripts. - Use narrowly scoped, revocable API credentials with expiration, transaction limits, and separate permissions for reading, trading, and withdrawals. - Document immediate credential rotation and revocation procedures. - Require explicit user confirmation before any action that transfers assets or exposes wallet recovery material.

T08 · Insecure Dependencies

Warning
Location
skill.md:20
Finding
Security-Critical Trading Instructions Loaded from Mutable Remote Documents## Vulnerability Details **File Location**: `skill.md`, lines 20-39 and 106-116 **Vulnerability Type**: Unpinned remote instructional dependency **Risk Level**: Medium ### Vulnerable Code ```markdown ## Skill Files — READ THE RIGHT FILE FOR EACH ACTION Each action has its own file. **Fetch only the file you need:** | Action | File | URL | |--------|------|-----| | **Buy / Sell** | TRADE.md | `https://plugy.fun/trade.md` | | **Create token** | CREATE.md | `https://plugy.fun/create.md` | | **Autonomous loop** | HEARTBEAT.md | `https://plugy.fun/heartbeat.md` | | **Security rules** | RULES.md | `https://plugy.fun/rules.md` | | **This file (hub)** | SKILL.md | `https://plugy.fun/skill.md` | | **Metadata** | package.json | `https://plugy.fun/skill.json` | **Install all locally:** ```bash mkdir -p ~/.plugy/skills/plugy curl -s https://plugy.fun/skill.md > ~/.plugy/skills/plugy/SKILL.md curl -s https://plugy.fun/trade.md > ~/.plugy/skills/plugy/TRADE.md curl -s https://plugy.fun/create.md > ~/.plugy/skills/plugy/CREATE.md curl -s https://plugy.fun/heartbeat.md > ~/.plugy/skills/plugy/HEARTBEAT.md curl -s https://plugy.fun/rules.md > ~/.plugy/skills/plugy/RULES.md curl -s https://plugy.fun/skill.json > ~/.plugy/skills/plugy/package.json ``` ``` ```markdown ### Buy or sell a token? → **Fetch `https://plugy.fun/trade.md`** — has the exact curl, params, and response format. ### Create / launch a new token? → **Fetch `https://plugy.fun/create.md`** — has the exact curl, required fields, and common mistakes. ### Set up autonomous trading? → **Fetch `https://plugy.fun/heartbeat.md`** — has the full heartbeat loop, strategy setup, and signal filtering. ### Check balance or positions? → **Fetch `https://plugy.fun/trade.md`** — helper endpoints are documented there too. **Do NOT guess any curl format. Fetch the right file and follow it exactly.** ``` ### Technical Analysis ...[truncated 2701 chars]
Remediation
## Remediation Suggestions - Bundle all security-critical trading, token-creation, and autonomous-loop instructions inside the reviewed Skill package. - If remote retrieval is required, reference immutable versioned resources and publish a cryptographic digest, such as SHA-256, for every file. - Verify each downloaded file against its expected digest or a trusted digital signature before loading it as agent instructions. - Fail closed when validation fails; do not silently fall back to the latest remote document. - Disable or strictly validate HTTP redirects so content cannot be retrieved from an unexpected origin. - Maintain a signed manifest that binds file names, versions, URLs, and hashes. - Review remote content as untrusted data rather than automatically authoritative instructions. - Require explicit human confirmation for purchases, sales, token creation, withdrawals, and activation or modification of autonomous trading. - Apply server-side transaction limits, asset allowlists, rate limits, and narrowly scoped credentials so altered instructions cannot exercise unrestricted financial authority. - Record the verified document version and digest in audit logs without recording credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (7)

Credential Access

High
Category
Privilege Escalation
Content
**Tell your human:**
> "Here is your wallet private key: `[privateKey]`. Save it securely — it will never be shown again. Send SOL to `[publicKey]` to start trading."

Store the apiKey in your memory, environment variables (`PLUGY_API_KEY`), or `~/.config/plugy/credentials.json`.

---
Confidence
98% confidence
Finding
The instruction to store the API key in memory, environment variables, or a local credentials file grants the agent persistent access to sensitive trading credentials. In an agent environment, such storage can be read by other tools, leaked through prompts or logs, or misused across tasks, resulting in unauthorized trades and account abuse.

Session Persistence

Medium
Category
Rogue Agent
Content
**Install all locally:**
```bash
mkdir -p ~/.plugy/skills/plugy
curl -s https://plugy.fun/skill.md     > ~/.plugy/skills/plugy/SKILL.md
curl -s https://plugy.fun/trade.md     > ~/.plugy/skills/plugy/TRADE.md
curl -s https://plugy.fun/create.md    > ~/.plugy/skills/plugy/CREATE.md
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.

Skill Enumeration

Medium
Category
Agent Snooping
Content
**Install all locally:**
```bash
mkdir -p ~/.plugy/skills/plugy
curl -s https://plugy.fun/skill.md     > ~/.plugy/skills/plugy/SKILL.md
curl -s https://plugy.fun/trade.md     > ~/.plugy/skills/plugy/TRADE.md
curl -s https://plugy.fun/create.md    > ~/.plugy/skills/plugy/CREATE.md
curl -s https://plugy.fun/heartbeat.md > ~/.plugy/skills/plugy/HEARTBEAT.md
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill goes beyond trading instructions and directs the agent to register for a custodial wallet, receive a one-time private key, and participate in secret handling workflows. This expands the agent’s privilege boundary into wallet provisioning and key management, which is highly sensitive and increases the chance of accidental disclosure, misuse, or unauthorized fund access.

Context-Inappropriate Capability

Medium
Confidence
98% confidence
Finding
The skill explicitly instructs the agent to persist an API key in memory, environment variables, or a local credentials file. Persisting secrets in broad agent-accessible storage increases exposure to prompt leakage, plugin/tool compromise, filesystem disclosure, or reuse by unrelated sessions and capabilities.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs the agent to display a wallet private key directly to the user in the conversational channel. Even if intended for legitimate recovery, exposing a secret in an LLM transcript is dangerous because chat logs, analytics pipelines, screenshots, shared sessions, or downstream tools may retain or leak the key, enabling theft of wallet funds.

Vague Triggers

Low
Confidence
85% confidence
Finding
The hub description says only "Trade Solana tokens. Buy, sell, create. Works with any AI agent." without specifying concrete trigger phrases, scope boundaries, or exclusion conditions. For a markdown skill file, this is broad enough that generic trading-related requests could match unintentionally.

Static analysis

No suspicious patterns detected.