Back to skill

Security audit

Graveyard Protocol CLI

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned but asks agents to install and run a wallet-capable CLI in ways that can auto-confirm blockchain actions across saved wallets.

Review before installing. Only use this with wallets you explicitly choose, prefer dry-run first, avoid --all and --yes unless you have already reviewed the exact wallet, accounts, reclaimed SOL, protocol fee, and claim details, and consider installing a pinned CLI version in a constrained environment rather than a mutable global npm package.

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:49
Finding
Unpinned Third-Party CLI Installed Globally with Access to Wallet Keys and Transaction Signing<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:49-52` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @graveyardprotocol/gp-cli ``` ### Technical Analysis The Skill instructs users or agents to globally install `@graveyardprotocol/gp-cli` without specifying an exact version or verifying a package integrity hash. Consequently, installation resolves to whichever package version the npm registry serves at execution time rather than the version reviewed when the Skill was published. This dependency is security-sensitive because the documented workflow gives it access to Solana keypair files, encrypted wallet storage, local transaction signing, and network communication with the Graveyard Protocol backend. The relevant package implementation, lockfile, and integrity metadata are not included in the audited artifact, so the claims that private keys remain local and transactions are constructed safely cannot be independently verified from this project. Global installation also increases scope: the executable is placed in a shared command search path and may remain available after the Skill operation ends. This is broader than a project-local, version-pinned installation. No evidence in `SKILL.md` proves that the current npm package is malicious or that private keys are currently transmitted. The vulnerability is the unsafe and mutable dependency acquisition mechanism combined with the dependency's highly sensitive wallet privileges. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, registry delivery path, or another component used by `@graveyardprotocol/gp-cli`. 2. The attacker publishes a modified package under the same package name and a version selected by the unpinned installation command. 3. An agent or user follows the Skill and executes: ```bash npm install -g @graveyardprotocol/gp-cli ``` 4. npm i ...[truncated 1724 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact, security-reviewed version: ```bash npm install --save-exact @graveyardprotocol/gp-cli@1.2.2 ``` Do not use version ranges or implicitly install the latest release. 2. Prefer a project-local installation over a global installation: ```bash npm install --save-exact @graveyardprotocol/gp-cli@1.2.2 npx --no-install gp ... ``` This limits command-path exposure and makes dependency state easier to inspect. 3. Commit and enforce a lockfile containing registry resolution and integrity metadata. Use `npm ci` rather than mutable installation commands in automated environments. 4. Verify package provenance, signatures, and published integrity before installation. Pin the expected package digest in the Skill or a trusted deployment manifest. 5. Include or vendor the reviewed CLI source in the audited project, or link the exact immutable source commit corresponding to the installed package version. Confirm that the npm artifact reproducibly matches that source. 6. Disable npm lifecycle scripts during installation unless they are reviewed and required: ```bash npm ci --ignore-scripts ``` If lifecycle scripts are necessary, audit them explicitly before allowing execution. 7. Run the CLI in a restricted environment with access only to the required keypair file, wallet directory, and approved backend domain. Avoid exposing unrelated credentials or home-directory content. 8. Require `--dry-run` and explicit user approval before each state-changing transaction. Do not default to unattended `--all --yes` operations for wallets holding meaningful value. 9. Display and independently validate complete transaction details before signing, including instructions, account permissions, recipients, protocol fees, and reclaimed amounts. 10. Document package update and incident-response procedures, including revocation or migration of any wallet whose keypair was exposed to an ...[truncated 26 chars]
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (8)

Vague Triggers

Medium
Confidence
95% confidence
Finding
The manifest description says to use the skill when 'the user wants to' perform several actions, including broad phrases like checking earnings or claiming rewards. This does not provide a clear, bounded trigger phrase set or exclusion conditions, so it could overlap with ordinary wallet- or rewards-related requests and cause unintended invocation.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
Scan all or a specified wallet for empty SPL token accounts and close them, returning locked rent to the respective wallet(s). `-y or --yes` option provide auto confirmation to the `Close empty accounts?` interactive prompt.

```bash
gp close-empty --wallet <address> --yes --json    # target a specific walletskip confirmation prompt

gp close-empty --all -y --json                 # all saved wallets, auto-confirm
Confidence
90% confidence
Finding
The skill explicitly promotes `--yes` to skip confirmation for a value-moving blockchain operation that closes token accounts and submits signed transactions. In an agent context, this reduces human oversight and can enable unintended execution across the wrong wallet or at the wrong time, especially because the backend scan results drive what gets closed.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
```bash
gp close-empty --wallet <address> --yes --json    # target a specific walletskip confirmation prompt

gp close-empty --all -y --json                 # all saved wallets, auto-confirm

gp close-empty --wallet <address> --dry-run --yes --json  # preview — no transactions sent
```
Confidence
90% confidence
Finding
The auto-confirm pattern encourages unattended execution of a transaction-generating command. Although closing empty token accounts is a legitimate workflow, removing confirmation safeguards in an agent environment increases the risk of unauthorized or mistaken on-chain actions.

Session Persistence

Medium
Category
Rogue Agent
Content
gp stats --all --json                        # summary JSON for all saved wallets

gp stats --wallet <address> --yes --json     # auto-write CSV without prompting

gp stats --wallet <address> --csv-out ~/report.csv --json   # write CSV to path
```
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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
# Add a wallet non-interactively
gp add-wallet --keypair-file ~/.config/solana/id.json --name "Bot" --json

# Close empty accounts — auto-confirm, JSON output
gp close-empty --wallet <address> --yes --json

# Close for all wallets
Confidence
88% confidence
Finding
This section normalizes fully unattended wallet operations, including adding a wallet from a local keypair file and then performing auto-confirmed account closures. In an agent or CI environment, that combination can lead to secret-adjacent handling and irreversible blockchain actions without meaningful user verification.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
gp stats --wallet <address> --json
gp stats --all --json

# Claim SOUL (auto-confirms in JSON mode)
gp claim-soul --wallet <address> --json
gp claim-soul --all --json
```
Confidence
85% confidence
Finding
Auto-confirming `claim-soul` is less dangerous than `close-empty` because the skill states no local signing is required and the action claims allocated rewards. However, it still authorizes an external state-changing operation without confirmation, which is a poor fit for autonomous agents.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- **`--json` requires `--wallet` or `--all`.** In JSON mode the interactive
  wallet picker is suppressed. Always pass an explicit wallet address or
  `--all` flag.
- **`--json` auto-confirms.** In JSON mode the "close accounts?" and "claim
  SOUL?" prompts can be skipped by using `--yes` as default response— transactions proceed automatically.
- **No signing for SOUL claims.** `gp claim-soul` does not require
  your keypair for signing. Your wallet public-key is sufficient. The SOUL tokens are transferred from Project's Community Wallet making it the transaction Signer and The backend handles signing entirely.
Confidence
94% confidence
Finding
The documentation states that JSON mode can effectively bypass interactive prompts and let transactions proceed automatically. In a skill intended for agent use, this materially increases the chance of silent execution of blockchain-affecting actions, especially when combined with `--all` or persisted wallets.

Missing User Warnings

Low
Confidence
87% confidence
Finding
The Add/Remove Wallets section documents `gp remove-wallet --wallet <address>` but does not explicitly warn that this deletes the locally stored encrypted wallet entry from `~/.gp-cli/wallets.json`. Because this is a data-affecting operation, the skill description should clearly disclose the local deletion impact before use.

Static analysis

No suspicious patterns detected.