Back to skill

Security audit

Solana On-Chain Agent Registry, Reputation & Trust

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Solana SDK guide, but it asks agents to use a raw wallet private key and perform irreversible blockchain writes without enough safety scoping or warnings.

Review this skill before installing if you plan to give the agent wallet access. Use a low-value delegated wallet, keep private keys out of general agent environments when possible, prefer external signing or skipSend flows, pin and review npm dependencies, and require explicit human confirmation before transfers, metadata deletion, immutable metadata writes, or other on-chain mutations.

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

Warning
Location
skill.md:16
Finding
Unpinned npm Dependencies Execute in a Wallet-Sensitive Environment<![CDATA[ ## Vulnerability Details **File Location**: `skill.md:16` **Vulnerability Type**: Unpinned third-party dependencies and npm lifecycle script exposure **Risk Level**: Medium ### Vulnerable Code ```bash npm install 8004-solana @solana/web3.js ``` ### Technical Analysis The installation instructions do not pin either npm dependency to an exact, reviewed version and do not provide a lockfile or integrity verification mechanism. Consequently, running the command can resolve package versions that differ from those reviewed when the Skill was authored. By default, npm may execute package lifecycle scripts during installation. Such scripts run with the permissions of the user invoking npm and can access files, environment variables, and network resources available to that process. This is particularly sensitive because the Skill declares and later reads `SOLANA_PRIVATE_KEY`: ```typescript const signer = Keypair.fromSecretKey( Uint8Array.from(JSON.parse(process.env.SOLANA_PRIVATE_KEY!)) ); ``` There is no evidence that the named packages are currently malicious. The vulnerability is the mutable and insufficiently verified supply-chain boundary: a compromised package release, maintainer account, or transitive dependency could introduce code after the Skill itself has been reviewed. ### Attack Path 1. An attacker compromises a dependency maintainer, npm publishing credential, or transitive package. 2. The attacker publishes a malicious version that satisfies the unpinned installation request. 3. A user follows the Skill instructions and runs `npm install 8004-solana @solana/web3.js`. 4. npm resolves and downloads the attacker-controlled release. 5. A malicious lifecycle script executes during installation, or malicious package code executes when the SDK is imported. 6. The payload accesses resources available to the Node.js process, potentially including wallet-related environment variables or local files. 7. The payload may exfiltrate credentials, m ...[truncated 840 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version: ```bash npm install --save-exact 8004-solana@0.6.3 @solana/web3.js@REVIEWED_VERSION ``` 2. Commit a reviewed `package-lock.json` and instruct users to install with: ```bash npm ci ``` 3. Verify lockfile integrity metadata and review transitive dependency changes before upgrades. 4. Disable lifecycle scripts during installation where package functionality permits: ```bash npm ci --ignore-scripts ``` If scripts are required, explicitly document and review each script before enabling it. 5. Perform installation in an environment where wallet keys and service credentials are not present. Inject `SOLANA_PRIVATE_KEY` only at runtime and only into the process that requires signing. 6. Prefer a dedicated, low-privilege runtime account or isolated container with restricted filesystem and network access. 7. Add dependency scanning and provenance checks, such as npm audit, automated lockfile review, package signature or provenance verification, and allowlisting of expected package sources. 8. Test dependency updates separately before changing pinned versions. Do not use floating version ranges for wallet-sensitive production deployments. ]]>
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 (2)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs users to load a Solana private key directly from the `SOLANA_PRIVATE_KEY` environment variable and materialize it into a `Keypair` for write operations, but it provides no warning about secret handling, least-privilege use, or the risk of exposing a hot wallet to an agent runtime. In the context of an agent skill, this is especially dangerous because the same agent that reads the skill may also gain access to the environment and can then perform irreversible on-chain actions or exfiltrate the key if the surrounding system is compromised or prompt-injected.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill documents state-changing and destructive operations such as metadata updates, deletion, ownership transfer, and wallet changes without an explicit warning that these actions are irreversible or security-sensitive. In an agent-skill setting, this increases the chance that an autonomous or prompt-influenced agent invokes high-impact blockchain operations without human confirmation, potentially causing asset loss, ownership changes, or permanent metadata damage.

Static analysis

No suspicious patterns detected.