Back to skill

Security audit

x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront

Security checks for vulnerabilities and agentic risk

Overview

This is a non-executable guide, but it unnecessarily asks the OpenClaw environment to provide sensitive secrets just to load it.

Review before installing. The guide content itself appears purpose-aligned, but do not provide GITHUB_TOKEN or DASHBOARD_SECRET merely to read it. If you use the deployment examples, create separate least-privilege secrets only in the deployed storefront environment, keep the GitHub token restricted to one repository with read-only access, and use a strong dashboard secret outside the skill-loading context.

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

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:14
Finding
Documentation-Only Skill Requests Unnecessary Sensitive Credentials## Vulnerability Details **File Location**: `SKILL.md:14-22` **Vulnerability Type**: Violation of least privilege through excessive credential requirements **Risk Level**: Medium ### Vulnerable Code ```yaml credentials: [GITHUB_TOKEN, WALLET_ADDRESS, DASHBOARD_SECRET] metadata: openclaw: requires: env: - GITHUB_TOKEN - WALLET_ADDRESS - DASHBOARD_SECRET primaryEnv: GITHUB_TOKEN ``` ### Technical Analysis The Skill declares itself to be a non-executable educational guide with `executable: false` and `install: none`. Its notice also states that the documented sandbox requires no API key. Despite this, the metadata requires the host to provide a GitHub personal access token and an administrative dashboard secret when the Skill is loaded. These credentials are not necessary to read or use the guide. Requiring them therefore violates least privilege by expanding the Skill's credential exposure beyond its declared runtime needs. Designating `GITHUB_TOKEN` as `primaryEnv` further increases the likelihood that a sensitive repository token will be provisioned by default. The guide later describes legitimate, optional deployment-time uses for these values: fetching paid content from a private GitHub repository and authenticating to a storefront's administrative API. Those optional operations do not justify requiring the credentials for the documentation-only Skill itself. No executable source or script is present in the audited package, so the audit found no evidence that the current artifact actively reads or exfiltrates these credentials. The finding concerns unnecessary credential provisioning and the resulting access surface, rather than confirmed credential theft. ### Attack Path 1. A user installs or loads the Skill to consult its educational content. 2. The host processes the `metadata.openclaw.requires.env` declaration. 3. The host or user supplies `GITHUB_TOKEN` and `D ...[truncated 1519 chars]
Remediation
## Remediation Suggestions 1. Remove `GITHUB_TOKEN` and `DASHBOARD_SECRET` from `credentials`, `metadata.openclaw.requires.env`, and `primaryEnv`. 2. Do not require any secret merely to install or read this non-executable guide. 3. Request credentials only when a user explicitly performs an optional deployment or private-content-delivery operation. 4. For GitHub access, recommend a fine-grained, read-only token restricted to the single content repository and only the required content permissions. 5. Keep the dashboard secret in the deployed server's secret manager or protected environment, not in the Skill-loading environment. 6. Prevent secrets from appearing in command history, logs, generated configuration, or client-side output. 7. Align the metadata name `WALLET_ADDRESS` with the documented configuration name `AGENT_WALLET_ADDRESS` to avoid users provisioning unintended variables. 8. Clearly separate “guide requirements” from “optional deployment requirements” in both metadata and documentation. 9. If future versions add executable files, ensure those files receive only operation-specific credentials at invocation time and add automated checks for unexpected environment-variable access or outbound transmission.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Credential Access

High
Category
Privilege Escalation
Content
> provides 500 free credits — no API key required to get started.
>
> **Referenced credentials** (you supply these in your own environment):
> - `GITHUB_TOKEN`: GitHub Personal Access Token for private repo content delivery (read-only, scoped to a single repository)
> - `WALLET_ADDRESS`: Blockchain wallet address for receiving payments (public address only — no private keys)
> - `DASHBOARD_SECRET`: Admin dashboard authentication secret (local admin panel access only)
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
- Node.js >= 22
- A Base wallet address (for receiving USDC payments)
- A GitHub personal access token (for content delivery from a private repo)

### Step 1: Clone and configure
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
git clone <your-repo>
cd your-storefront
cp .env.example .env
```

Edit `.env`:
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Intent-Code Divergence

Medium
Confidence
83% confidence
Finding
The guide minimizes the GitHub token as read-only and single-repo scoped, but elsewhere positions it in a broader deployment/content-delivery workflow. That mismatch can cause operators to provision a token with more privilege than readers assume, increasing risk of repository exposure or misuse if the token is reused in CI/CD or on the server.

External Transmission

Medium
Category
Data Exfiltration
Content
### Step 3: Add your first product

```bash
curl -X POST http://localhost:3000/products \
  -H "Authorization: Bearer your-strong-random-secret-here" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Via API (recommended for automation)

```bash
curl -X POST https://your-store.com/products \
  -H "Authorization: Bearer $DASHBOARD_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.