Back to skill

Security audit

Openclaw Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to do what it advertises, but it handles a wallet private key and paid API calls with weak guardrails and an unpinned payment SDK.

Install only with a dedicated low-balance Base wallet, not a primary wallet. Treat every invocation as potentially spending USDC, avoid automatic chained use without a budget, and verify the claw402 SDK version and gateway destination before use.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Error
Location
SKILL.md:20
Finding
Unpinned Third-Party Payment SDK Receives a Wallet Private Key<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20-22`; related runtime use at `scripts/query.mjs:13,20-26` **Vulnerability Type**: Unpinned security-sensitive dependency **Risk Level**: High ### Vulnerable Code `SKILL.md:20-22`: ```yaml install: - kind: node package: NoFxAiOS/claw402-js ``` Related runtime code in `scripts/query.mjs:13,20-26`: ```js import { Claw402 } from 'claw402' const privateKey = process.env.WALLET_PRIVATE_KEY if (!privateKey) { console.error(JSON.stringify({ error: 'WALLET_PRIVATE_KEY environment variable is required' })) process.exit(1) } const gateway = process.env.CLAW402_GATEWAY ?? 'https://claw402.ai' const client = new Claw402({ privateKey, baseUrl: gateway }) ``` ### Technical Analysis The installation metadata references the external package or repository `NoFxAiOS/claw402-js` without an immutable version, commit identifier, or integrity hash. The project also contains no reviewed local implementation or lockfile establishing the exact dependency code that will execute. This dependency is security-sensitive because the script imports `Claw402` from it and passes `WALLET_PRIVATE_KEY` directly to its constructor. The audited project code does not explicitly transmit the key, and the documentation states that signing occurs locally. However, that guarantee ultimately depends on the behavior of dependency code that is not pinned or included in the audited project. The installation identifier (`NoFxAiOS/claw402-js`) also differs from the runtime import name (`claw402`). This may be legitimate packaging behavior, but it should be explicitly verified to prevent dependency substitution or confusion. ### Attack Path 1. An attacker compromises the mutable upstream package, repository, publishing account, or dependency-resolution path. 2. The attacker publishes code that preserves the expected `Claw402` interface while adding credential collection or unauthorized signing behavior. 3. A subsequent instal ...[truncated 1385 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the SDK to an immutable, reviewed release and exact version. 2. If installation occurs from a source repository, pin an audited commit hash rather than a branch or mutable tag. 3. Include a lockfile containing resolved versions and integrity hashes, and enforce immutable or frozen-lockfile installation in deployment. 4. Verify and document why the installation identifier is `NoFxAiOS/claw402-js` while the runtime import is `claw402`. 5. Audit the SDK code that receives `privateKey`, particularly all networking, telemetry, logging, signing, and payment-validation paths. 6. Consider vendoring the minimal signing implementation after review so changes are visible during Skill audits. 7. Run the script with a dedicated, low-balance wallet rather than a primary wallet. 8. Enforce per-call and per-session spending limits independently of the remote server. 9. Isolate the process with minimal filesystem access and a restricted environment containing only required variables. 10. Add dependency provenance and signature verification to the release process. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/query.mjs:20
Finding
Unrestricted Gateway Override Is Combined with Wallet-Signing Capability<![CDATA[ ## Vulnerability Details **File Location**: `scripts/query.mjs:20-26,39-57` **Vulnerability Type**: Unvalidated remote endpoint configuration for a payment-signing client **Risk Level**: High ### Vulnerable Code `scripts/query.mjs:20-26`: ```js const privateKey = process.env.WALLET_PRIVATE_KEY if (!privateKey) { console.error(JSON.stringify({ error: 'WALLET_PRIVATE_KEY environment variable is required' })) process.exit(1) } const gateway = process.env.CLAW402_GATEWAY ?? 'https://claw402.ai' const client = new Claw402({ privateKey, baseUrl: gateway }) ``` `scripts/query.mjs:39-57`: ```js const body = JSON.parse(bodyStr) const url = `${gateway}${path}` data = await client._post(path, body) console.log(JSON.stringify({ status: 200, url, data }, null, 2)) } else { // Parse key=value params const params = {} for (const arg of rest) { const idx = arg.indexOf('=') if (idx > 0) params[arg.slice(0, idx)] = arg.slice(idx + 1) } const qs = new URLSearchParams(params).toString() const url = `${gateway}${path}${qs ? '?' + qs : ''}` data = await client._get(path, params) console.log(JSON.stringify({ status: 200, url, data }, null, 2)) } ``` ### Technical Analysis `CLAW402_GATEWAY` can replace the documented `https://claw402.ai` service with any supplied string. The script does not enforce HTTPS, validate the destination hostname, restrict ports, or apply an origin allowlist before constructing a client that also receives the wallet private key. The script delegates payment negotiation and signing to the SDK without locally visible validation of: - The blockchain network. - The payment token. - The recipient address. - The requested amount. - A maximum per-call or per-session cost. - Whether the destination is the expected service. The configurable gateway may be useful for development or self-hosting, but unrestricted endpoint selection exceeds the minimum network authority needed for the ...[truncated 2408 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `CLAW402_GATEWAY` in production and use a fixed, audited origin when only `claw402.ai` is required. 2. If custom gateways are necessary, parse the value with `URL` and enforce: - The `https:` protocol. - An explicit hostname allowlist. - Approved ports. - No embedded credentials. - No redirects to unapproved origins. 3. Separate production and development modes. Require an explicit, prominent opt-in before allowing non-production endpoints. 4. Validate payment terms locally before signing, including the exact chain ID, token contract, recipient, amount, expiration, and request identity. 5. Define hard maximums for each payment, session, and time period. Reject terms that exceed documented endpoint prices. 6. Display the destination, recipient, token, network, and amount and request user confirmation for new origins or payments above a low threshold. 7. Use a dedicated wallet with only the minimum necessary USDC balance. 8. Do not send secrets, personal data, proprietary source code, or confidential images in AI request bodies unless the user has explicitly approved transmission. 9. Add a clear privacy notice explaining that request parameters and POST bodies are transmitted to the configured gateway and potentially to downstream AI providers. 10. Add tests proving that HTTP URLs, unexpected hosts, invalid chains, unexpected recipients, and excessive payment amounts are rejected. ]]>
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 (114)

Missing User Warnings

High
Confidence
98% confidence
Finding
Although pricing is listed, the skill does not present a clear user-facing warning that every invocation can spend funds from the user's wallet. Because the skill encourages chaining multiple calls and emphasizes frictionless payment, users may incur repeated micropayments without informed consent, especially when invoked automatically by an agent.

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/query.mjs <endpoint-path> [key=value ...]
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Static analysis

No suspicious patterns detected.