Back to skill

Security audit

Claw Fm

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says for claw.fm music submission, but it asks agents to use an EVM private key for paid x402 submissions and even suggests daily automation without clear payment approval or spending controls.

Review this skill carefully before installing. Use only a dedicated low-balance wallet, never place a primary private key in TOOLS.md or logs, and require manual approval for each paid x402 submission. Only upload media you are comfortable sending to claw.fm and Replicate, and enable heartbeat automation only if you accept recurring local state writes and possible future paid submissions.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:38
Finding
Unbounded Automatic Cryptocurrency Payment Signing<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 12-13, 38-60, and 143-149 **Vulnerability Type**: Automatic cryptocurrency signing without documented transaction constraints or user confirmation **Risk Level**: High ### Vulnerable Code The Skill permits a private key to be supplied through an environment variable or `TOOLS.md`: ```markdown ### Your Identity - Wallet address is your identity (set via `CLAW_FM_WALLET` env or in TOOLS.md) - Private key for x402 payments (set via `CLAW_FM_PRIVATE_KEY` env) ``` The payment example converts the private key into a signing account and delegates payment handling to an x402 wrapper: ```javascript import { wrapFetchWithPayment } from '@x402/fetch'; import { x402Client } from '@x402/core/client'; import { registerExactEvmScheme } from '@x402/evm/exact/client'; import { privateKeyToAccount } from 'viem/accounts'; const account = privateKeyToAccount(PRIVATE_KEY); const client = new x402Client(); registerExactEvmScheme(client, { signer: account }); const paymentFetch = wrapFetchWithPayment(fetch, client); const form = new FormData(); form.append('title', 'Track Title'); form.append('genre', 'electronic'); form.append('description', 'Track description'); form.append('tags', 'electronic,trap,bass'); form.append('audio', audioBlob, 'track.mp3'); form.append('image', imageBlob, 'cover.jpg'); const res = await paymentFetch('https://claw.fm/api/submit', { method: 'POST', body: form }); ``` The Skill also recommends unattended daily submission: ```markdown ## Daily Automation Pattern For heartbeat-based daily submissions: 1. Track last submission date in `memory/heartbeat-state.json` 2. Check if submission already done today 3. Generate track using existing tracks as style reference 4. Generate cover art 5. Submit via x402 6. Update state file ``` ### Technical Analysis The Skill grants its payment workflow access to an EVM private key and configures that key as the signer used by `wrapFetchW ...[truncated 3136 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Require explicit payment approval** - Display the exact amount, token, recipient, chain, and reason before every paid submission. - Require affirmative user confirmation immediately before signing. - Do not allow heartbeat or unattended automation to approve paid transactions. 2. **Validate every payment challenge** - Enforce an allowlist of expected chain IDs. - Verify the exact USDC token contract address for each allowed chain. - Allow only the documented claw.fm payment recipient. - Reject payments above the documented price or any amount not explicitly approved. - Validate challenge expiration, request binding, and replay protection. 3. **Implement spending limits** - Enforce a hard per-transaction maximum of the documented submission price. - Add daily and lifetime spending limits. - Fail closed when pricing or payment metadata is missing, ambiguous, or changed. 4. **Reduce wallet privileges** - Use a dedicated, low-balance wallet exclusively for this Skill. - Do not reuse a primary wallet or a wallet holding unrelated assets. - Where supported, use scoped session keys or smart-account policies that restrict recipient, token, chain, amount, and transaction frequency. 5. **Protect secret material** - Store private keys in an operating-system keychain, hardware wallet, or dedicated secret manager. - Never place private keys in `TOOLS.md`, source files, logs, memory files, prompts, or other workspace documentation. - Ensure errors and diagnostic output cannot serialize the key or signer object. 6. **Separate free and paid automation** - Permit unattended submission only when the server confirms that no payment is required. - Pause and request user authorization whenever an x402 payment challenge is returned. - Record sanitized transaction details and approval status in an audit log without recording private keys. ]]>
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 (3)

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill tells the agent to use a private key for x402 payments but does not include strong guidance about secure secret handling, transaction risk, or the fact that submissions may spend real funds. In an autonomous-agent context, this increases the chance of accidental fund expenditure, unsafe key exposure, or use of overly privileged credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
form.append('audio', audioBlob, 'track.mp3');
form.append('image', imageBlob, 'cover.jpg');

const res = await paymentFetch('https://claw.fm/api/submit', {
  method: 'POST',
  body: form
});
Confidence
94% confidence
Finding
The skill submits audio, images, and metadata to an external service at claw.fm, which is an intentional capability but still represents data exfiltration to a third party. In this context, the danger is elevated because uploaded media may be proprietary or personal, and the submission endpoint is coupled to a payment flow that can trigger real financial spend.

Missing User Warnings

Low
Confidence
91% confidence
Finding
The skill instructs the agent to persist state in a local file under memory/heartbeat-state.json without warning that it will modify local files or recommending a constrained storage location. While low severity, this can cause unintended filesystem writes, overwrite existing state, or create persistent artifacts in environments where users did not expect file modification.

Static analysis

No suspicious patterns detected.