Back to skill

Security audit

AI Content Engine

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly transparent about being a paid remote content-generation service, but its wallet-signing setup is too broad for automatic installation without careful review.

Install only if you are comfortable connecting an agent to this remote service and funding payments. Use sandbox mode or API-key prepaid tokens when possible, avoid a primary wallet, keep any agent wallet low-balance with no unrelated assets or approvals, and require your client setup to show and approve exact payment details before every signature.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:88
Finding

Payment Wrapper Receives Signing Authority Without an Explicit Approval Gate

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 88–116
Vulnerability Type: Missing payment authorization control
Risk Level: High

Vulnerable Code

text
**No funds are ever auto-debited.** The payment flow is:

1. Agent calls a paid tool (e.g. `create_script`)
2. Server responds with **HTTP 402 Payment Required** containing the exact USDC amount, recipient wallet, and network
3. The agent's x402 client library reads the 402 response and **presents the payment for authorization** — the agent decides whether to sign
4. If the agent authorizes, the client signs a USDC transfer for the exact amount specified and retries the request with the signed payment proof
5. Server verifies the payment, settles the transaction on-chain, and processes the request

**Each payment is explicit, per-request, and for an exact amount.** The server cannot withdraw funds, charge more than the stated amount, or initiate payments. The agent (or its x402 client) must actively sign each transaction.
typescript
import { wrapFetch } from "@x402/fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

// Create wallet from the dedicated agent wallet key
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY);
const wallet = createWalletClient({ account, chain: base, transport: http() });

// Wrap fetch — paid requests are handled via 402 → sign → retry
const x402fetch = wrapFetch(fetch, wallet, "eip155:8453");
text
The wrapped `fetch` handles the 402 challenge-response cycle.

Technical Analysis

The example grants the HTTP payment wrapper access to a signing-capable wallet. However, it does not implement or demonstrate a mandatory authorization callback between receiving a server-controlled HTTP 402 challenge and signing the resulting USDC authorization.

This conflicts with the d ...[truncated 1529 chars]

Remediation
View remediation

Remediation Suggestions

  • Require an explicit, non-bypassable approval callback before every signature.
  • Present the operation, exact amount, USDC token contract, chain ID, recipient, expiration, and cumulative spend to the approving user or agent.
  • Independently parse and validate the HTTP 402 challenge rather than relying exclusively on the remote endpoint or wrapper.
  • Allowlist the expected chain, token contract, recipient addresses, and payment protocol version.
  • Enforce per-transaction, per-operation, daily, and lifetime spending limits.
  • Reject challenges whose payment parameters differ between the initial response and retry.
  • Default to denying payments when approval is unavailable, ambiguous, or times out.
  • Record tamper-evident payment audit logs without recording the private key or sensitive authorization material.
  • Update the example to show the actual approval mechanism instead of asserting that the wrapper presents one.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:7
Finding

Wallet Private Key Is Declared as an Unconditional Skill Requirement

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 7–12 and 78–80
Vulnerability Type: Excessive credential access and violation of least privilege
Risk Level: Medium

Vulnerable Code

yaml
metadata:
  openclaw:
    requires:
      env:
        - CONTENT_ENGINE_URL
        - CONTENT_ENGINE_API_KEY
        - WALLET_PRIVATE_KEY
text
| `WALLET_PRIVATE_KEY` | For x402 per-call payments | Private key for an EVM wallet holding USDC on Base. Used by the x402 client library to sign payment authorizations. **Only needed if paying with USDC per call.** Not needed if you use an API key with prepaid tokens. |

**Important:** `WALLET_PRIVATE_KEY` gives the x402 client library the ability to sign USDC transfer authorizations. This key should be for a dedicated agent wallet with limited funds — not a primary wallet. See the Payment section for details on how funds are protected.

Technical Analysis

The metadata declares WALLET_PRIVATE_KEY as a required environment variable for the entire Skill. The accompanying documentation states that the credential is only needed for optional x402 payments and is unnecessary for public pricing, quotes, sandbox testing, brand-scoped reads, and prepaid-token workflows.

Placing a raw wallet private key into the general Skill environment gives every process, dependency, or component operating in that environment an opportunity to access a high-impact credential. This exceeds the minimum privileges needed for most declared operations. The recommendation to use a dedicated low-balance wallet limits potential losses but does not eliminate the unnecessary credential exposure.

Attack Path

  1. A user enables the Skill to perform an anonymous, sandbox, API-key-only, or prepaid-token operation.
  2. The Skill metadata causes WALLET_PRIVATE_KEY to be provisioned even though the selected operation does not require wallet signing.
  3. A compromised dependency, ...[truncated 701 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove WALLET_PRIVATE_KEY from the unconditional environment requirements.
  • Split public, API-key, prepaid-token, and x402 payment modes so wallet access is enabled only for the x402 path.
  • Request signing capability only immediately before an explicitly approved payment.
  • Prefer a hardware wallet, isolated signing service, or constrained signer over a raw private key stored in an environment variable.
  • Configure the signer to allow only the expected chain, USDC contract, recipient addresses, and limited transaction values.
  • Use a dedicated wallet with minimal funds and no unrelated assets or contract permissions.
  • Ensure logs, error reports, process listings, and debugging output never include environment variable values.
  • Revoke and rotate any key suspected of exposure; private keys should not be reused after compromise.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:102
Finding

Security-Sensitive Payment Dependencies Are Not Version-Pinned

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 102–105
Vulnerability Type: Uncontrolled third-party dependency resolution
Risk Level: Medium

Vulnerable Code

typescript
import { wrapFetch } from "@x402/fetch";
import { createWalletClient, http } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { base } from "viem/chains";

Technical Analysis

The documented implementation relies on @x402/fetch and viem for payment handling, private-key conversion, wallet creation, and transaction signing. The project contains no dependency manifest, lockfile, exact version constraints, integrity hashes, or provenance guidance for these security-sensitive packages.

The imports alone do not identify which package releases users should install. Consequently, an implementation following the documentation may resolve unreviewed, incompatible, or subsequently compromised releases. These dependencies are particularly sensitive because they receive wallet signing authority and process payment parameters supplied through a remote HTTP response.

Attack Path

  1. A user follows the documented example and installs the named dependencies without exact version constraints or a reviewed lockfile.
  2. Package resolution selects an unreviewed, compromised, or behaviorally incompatible release.
  3. The resolved dependency receives access to the wallet account or payment challenge.
  4. Malicious dependency code reads sensitive key material, changes payment parameters, signs unintended authorizations, or transmits secrets externally.
  5. The attacker gains wallet signing capability or causes unauthorized financial transactions.

Impact Assessment

A compromised dependency executing in the agent process could access the wallet account object and other process-level credentials, including the Content Engine API key. Potential impact includes wallet theft, unauthorized payments, API-key di ...[truncated 148 chars]

Remediation
View remediation

Remediation Suggestions

  • Provide a dependency manifest with reviewed, exact versions of @x402/fetch, viem, and all transitive dependencies.
  • Commit a lockfile generated by a trusted package manager and require reproducible, frozen-lockfile installation.
  • Verify package provenance, registry ownership, signatures where available, and integrity hashes.
  • Run automated vulnerability and supply-chain scanning against the complete resolved dependency graph.
  • Review dependency updates before deployment rather than accepting automatic major or minor upgrades.
  • Isolate the signer from general application dependencies and expose only a narrowly constrained signing interface.
  • Document the specific tested versions and the expected approval behavior of the x402 wrapper.
  • Minimize credentials available to the process that loads third-party payment libraries.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

bash
# Get a quote (always free, no auth needed)
curl -X POST https://content-engine-x402.fly.dev/agent/quote \
  -H "Content-Type: application/json" \
  -d '{"operation":"script","duration_seconds":60}'

Static analysis

No suspicious patterns detected.