Back to skill

Security audit

ASMR Sleep Sound Generator | ASMR助眠音生成器

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for a browser-based ASMR generator, but it asks users to store an LLM API key in browser localStorage, which deserves review before installation.

Review this skill before installing if you plan to use the LLM feature. Use a restricted, low-quota, revocable API key, avoid entering a primary provider key, and clear browser storage when done. If running the local server, bind it to localhost only, for example with --bind 127.0.0.1, and do not serve directories containing secrets.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:37
Finding
Persistent plaintext storage of LLM API credentials in browser localStorage<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 37 **Vulnerability Type**: Client-side plaintext credential storage **Risk Level**: High ### Vulnerable Code Snippet ```markdown - **API 设置**:页面内置设置弹窗,用户自行配置 LLM API endpoint/key,存储在 localStorage ``` English translation: The page provides a settings dialog in which users configure an LLM API endpoint and key, and stores the configuration in `localStorage`. ### Technical Analysis The documented design persistently stores an LLM API key in browser `localStorage`. Values in `localStorage` are neither encrypted nor protected from JavaScript running under the same origin. They also remain available after the browser tab or session is closed. Consequently, any script that gains execution within the application origin can read the credential. Possible sources include a cross-site scripting vulnerability, a compromised third-party browser asset, an unsafe future application update, or other untrusted content served from the same origin. A malicious browser extension with suitable privileges may also access browser-page data. The submitted artifact contains documentation and metadata only, so the implementation of the storage operation and any compensating controls could not be inspected. The insecure persistence behavior is nevertheless explicitly specified by the Skill documentation. ### Attack Path 1. A user enters a valid LLM API key through the documented settings dialog. 2. The application persists the key in `localStorage`. 3. Attacker-controlled JavaScript obtains execution in the application's origin, such as through an application XSS flaw or a compromised executable dependency. 4. The malicious script reads the API key from its known or discoverable `localStorage` entry. 5. The script transmits the key to an attacker-controlled service. 6. The attacker uses the stolen credential directly against the configured LLM provider. ### Impact Assessment Successful exploitation exposes ...[truncated 599 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not persist provider API keys in `localStorage`, `sessionStorage`, IndexedDB, cookies readable by JavaScript, or other client-side persistent storage. 2. Route LLM requests through a trusted backend that keeps credentials in a server-side secret manager. 3. Issue narrowly scoped, short-lived session tokens to the browser instead of exposing the provider credential. 4. Apply provider-side least privilege, spending limits, request quotas, expiration, and origin or network restrictions where supported. 5. If a client-only architecture is unavoidable, retain the key only in memory for the active page and require the user to re-enter it after reload. 6. Clearly warn users that browser-side credentials can be exposed by scripts executing in the same origin. 7. Deploy a restrictive Content Security Policy, avoid inline scripts, pin required assets to reviewed versions, and prevent unrelated applications from sharing the origin. 8. Ensure logs, exported configuration, diagnostic reports, and error messages redact API keys. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:46
Finding
Documented development server command exposes the served directory on network interfaces<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 46–48 **Vulnerability Type**: Unnecessarily network-exposed development server **Risk Level**: Medium ### Vulnerable Code Snippet ```bash cd ~/.openclaw/workspace/projects/asmr-sleep-sound-generator/src python3 -m http.server 8765 # 浏览器打开 http://localhost:8765/ ``` English translation of the comment: Open `http://localhost:8765/` in a browser. ### Technical Analysis The documented command starts Python's `http.server` without an explicit `--bind` argument. In standard Python 3 behavior, the server binds to all available interfaces rather than exclusively to the loopback interface. The comment directs the user to a localhost URL, but it does not restrict remote network access. Any host able to reach port 8765 may therefore request files exposed beneath the selected document root. Python's development server provides no application authentication or transport encryption and is not intended as a hardened production server. The command changes into the intended `src` directory before starting the server, which limits exposure to that tree and reduces the severity. The actual contents of that directory were not included in the submitted artifact, so the presence of secrets or additional sensitive files could not be verified. ### Attack Path 1. A user follows the documented instructions on a system connected to a shared or untrusted network. 2. Python starts an unauthenticated HTTP server on port 8765 and listens on network interfaces. 3. Another host discovers or directly connects to the user's IP address on port 8765. 4. The remote host requests files available under the served `src` directory. 5. If the directory contains source maps, configuration files, generated artifacts, embedded credentials, or other unintended content, those files are disclosed. Exploitation requires network reachability. Host firewalls, container isolation, NAT, or network segmentation may prevent the connec ...[truncated 502 chars]
Remediation
<![CDATA[ ## Remediation Suggestions Bind the development server explicitly to the IPv4 loopback interface: ```bash cd ~/.openclaw/workspace/projects/asmr-sleep-sound-generator/src python3 -m http.server 8765 --bind 127.0.0.1 ``` Additional hardening measures: 1. Use `--bind ::1` separately if IPv6 loopback access is required. 2. Keep secrets, environment files, credentials, backups, source maps, and unrelated files outside the document root. 3. Do not use Python's development server for production or access across untrusted networks. 4. If remote access is necessary, use a maintained web server with authentication, TLS, explicit access controls, and a restrictive firewall policy. 5. Verify that local firewall rules deny inbound access to the development port from non-loopback interfaces. ]]>
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The skill name, description, and usage content are presented bilingually in Chinese and English, but the natural-language control feature does not state that users may choose their preferred language or locale. Because the policy requires avoiding forced language or locale behavior without opt-in or justification, this is a mild natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The natural-language content in the changelog is presented bilingually in Chinese and English across multiple entries, but the file does not state whether language selection is optional or user-configurable. Under the language/locale policy rule, forcing or assuming a language without opt-in can be a policy concern, even in descriptive metadata.

Static analysis

No suspicious patterns detected.