Back to skill

Security audit

PipRail

Security checks for vulnerabilities and agentic risk

Overview

This payment skill is mostly transparent about its purpose, but it asks users to run an unpinned npm MCP server with wallet-signing authority, so it needs Review before installation.

Install only after you are comfortable giving the PipRail MCP process wallet-signing authority. Prefer read-only mode first, pin @piprail/mcp to a reviewed exact version, use a dedicated low-balance wallet, keep caps small, and require explicit confirmation before any piprail_pay_request call.

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
openclaw.json:8
Finding
Unpinned Remote npm Package Execution in a Private-Key Trust Boundary## Vulnerability Details **File Location**: `openclaw.json`, lines 8–15 **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```json "command": "npx", "args": ["-y", "@piprail/mcp"], "env": { "PIPRAIL_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY", "PIPRAIL_CHAIN": "base", "PIPRAIL_MAX_AMOUNT": "0.10", "PIPRAIL_MAX_TOTAL": "5.00", "PIPRAIL_TOKENS": "USDC" } ``` The same unsafe package-resolution pattern also appears in: - `SKILL.md`, lines 18–24 and 88–91 - `README.md`, lines 28–33 - `verify.mjs`, lines 28–29 Relevant `verify.mjs` code: ```js const localBin = process.env.PIPRAIL_MCP_BIN const [command, baseArgs] = localBin ? [process.execPath, [localBin]] : ['npx', ['-y', '@piprail/mcp']] ``` ### Technical Analysis The OpenClaw configuration launches `@piprail/mcp` through `npx -y` without specifying an exact package version or integrity hash. Consequently, the code executed at startup can change after this Skill has been reviewed. The `-y` option permits package installation without interactive confirmation. This is particularly sensitive because the downloaded process is explicitly supplied with `PIPRAIL_PRIVATE_KEY`. It also runs under the user's operating-system identity and is not constrained by a sandbox in the supplied configuration. The project contains neither the MCP implementation nor a dependency lockfile, so this audit cannot independently verify the documented claims that the private key remains local or that spending limits are enforced before transactions are signed. The verifier uses the same floating dependency by default. Although it generates a throwaway key rather than passing a funded wallet key, it still executes remotely resolved code in the user's context. Its child environment also preserves `HOME`: ```js const child = spawn(command, baseArgs, { stdio: ['pipe', 'pipe', 'ignore'], env: { PATH: process.env.PATH, HOME: process.env.HOME, PIPRAIL_PRIVATE_KEY: '0x' + r ...[truncated 2187 chars]
Remediation
## Remediation Suggestions 1. Pin `@piprail/mcp` to an exact audited version rather than using a floating package reference: ```json "command": "npx", "args": ["-y", "@piprail/mcp@X.Y.Z"] ``` 2. Prefer installing dependencies ahead of time from a committed lockfile with npm integrity metadata, then execute the pinned local binary. Avoid downloading executable code whenever OpenClaw starts. 3. Include or vendor the exact MCP implementation or audited build artifact in the review scope. Verify its provenance and cryptographic digest before execution. 4. Establish a controlled upgrade process in which dependency changes require source review, lockfile review, automated scanning, and explicit approval. 5. Run the MCP process in a sandbox or dedicated operating-system account with: - Restricted filesystem access. - A minimal environment. - Network access limited to required RPC and payment endpoints. - No access to unrelated OpenClaw credentials or user files. 6. Use a dedicated, minimally funded wallet rather than a primary wallet. Enforce on-chain allowances, account-level policies, or multisignature controls so security does not depend solely on application-level spending caps. 7. Keep wallet secrets in a dedicated secret manager or narrowly scoped credential broker where supported, rather than storing them directly in a general configuration file. 8. Apply the same pinning and integrity controls to `verify.mjs`, `SKILL.md`, and `README.md` so testing and documented installation procedures do not reintroduce the floating dependency.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The README instructs users to launch the MCP server via `npx -y @piprail/mcp` without pinning an exact package version. That means each install/run can fetch whatever version is current on npm, creating a supply-chain risk where a compromised maintainer account, malicious update, or dependency takeover could execute arbitrary code in the agent environment and access configured secrets such as wallet keys.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The OpenClaw config example uses `command: "npx"` with `args: ["-y", "@piprail/mcp"]`, again pulling the latest package at execution time rather than a reviewed immutable version. In this skill's context, the MCP server may be given `PIPRAIL_PRIVATE_KEY`, so an upstream package compromise could directly exfiltrate private keys or initiate unauthorized payments within the configured budget.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The manual verification step tells users to run `npx -y @piprail/mcp` with no version pin, repeating the same untrusted-latest execution pattern. Because this is a payment skill and the surrounding instructions involve funded wallets and live payment flows, the consequence of a malicious package update is amplified: remote code execution could lead to theft of funds or sensitive credentials.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README's manual path explicitly instructs users to perform a live quote and then `Pay it` against a real endpoint, but it does not place a clear warning immediately adjacent to those steps that real funds may be spent and that explicit human confirmation should occur before payment. In an agent-skill context, this is more dangerous because users may enable autonomous tooling and supply a funded private key, increasing the chance of unintended real-money transactions during testing or routine use.

Lp3

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding
The skill declares and documents use of sensitive environment variables, including a private wallet key, but does not define any explicit tool scope or permissions boundary. In a payment-capable skill, missing scope declarations increases the chance that the host agent can expose or misuse secrets or invoke money-moving capabilities without clear policy constraints.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill installs and runs an MCP server from npm without pinning an exact version, so future executions may fetch whatever package version is current at that time. Because this package is entrusted with a private key and payment authority, a compromised upstream release, dependency hijack, or malicious publish could immediately lead to wallet compromise or unauthorized payments.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
Using `npx -y @piprail/mcp` without a pinned version causes on-demand execution of the latest published package code. In this specific skill, that code may receive a self-custodial private key and authorization to spend funds, so the unpinned remote execution path materially increases supply-chain risk and potential theft impact.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The script executes an MCP server via `npx -y @piprail/mcp` without pinning an exact package version or integrity, so each run can fetch whatever version is currently published. If the package is compromised, typo-squatted, or a malicious version is briefly published, running this verifier would execute attacker-controlled code locally with the inherited environment and network access.

Vague Triggers

Low
Confidence
84% confidence
Finding
This manifest-style file explains how to add the PipRail MCP server, but it does not describe when the skill/server should be invoked, what user requests it should respond to, or any exclusion conditions. For manifest files, missing trigger specificity can lead to unintended activation because the scope and constraints are left implicit.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
verify.mjs:36