Back to skill

Security audit

小红书短视频全解析

Security checks for vulnerabilities and agentic risk

Overview

This skill is review-worthy because it relies on a third-party parser that explicitly advertises bypassing Xiaohongshu anti-scraping and it under-discloses local API key handling.

Install only if you are authorized to submit the Xiaohongshu videos you analyze, accept the platform and copyright risks, and are comfortable sending those links to Cue's remote service. Prefer CUE_API_KEY or a proper secret store over ~/.cue/config.json, avoid sharing private or restricted links, and review any generated scripts before running them.

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

Warning
Location
SKILL.md:213
Finding
API Key Stored in Plaintext and Exposed Through Process Arguments<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 48, 200, and 213-221 **Vulnerability Type**: Plaintext credential storage and command-line credential exposure **Risk Level**: Medium ### Vulnerable Code ```bash export CUE_API_KEY="sk你的key" ``` ```bash -H "Authorization: Bearer $(python3 -c "import json;print(json.load(open('$HOME/.cue/config.json'))['api_key'])")" \ ``` ```python KEY = json.load(open(os.path.expanduser("~/.cue/config.json")))["api_key"] EP = "https://mcp.cuecue.cn/api/omni-reader/mcp/" def call(name, args, timeout=70): body = json.dumps({"jsonrpc":"2.0","id":1,"method":"tools/call", "params":{"name":name,"arguments":args}}).encode() p = subprocess.run(["curl","-sS","--max-time",str(timeout),"-X","POST",EP, "-H",f"Authorization: Bearer {KEY}","-H","Content-Type: application/json", "-H","Accept: application/json, text/event-stream","--data-binary",body], capture_output=True, text=True) ``` ### Technical Analysis The documentation recommends using the `CUE_API_KEY` environment variable, but both executable reference implementations instead retrieve the API key from the plaintext file `~/.cue/config.json`. The instructions do not require restrictive permissions for that file, such as mode `0600`, or for its parent directory. The Python implementation then interpolates the secret into a curl command-line argument: ```python "-H", f"Authorization: Bearer {KEY}" ``` Depending on the operating system and process-monitoring configuration, command-line arguments can be inspected through process-listing tools, process metadata, monitoring agents, diagnostic collectors, or audit logs. A local user or compromised process with sufficient visibility may therefore recover the bearer token while curl is running. This issue does not provide a remote attacker with direct access by itself. Exploitation requires local file-read access, process-inspection access, or access to ...[truncated 1162 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use `CUE_API_KEY` as the primary credential source and fail safely when it is absent. 2. If file-based storage must be supported, require: - `~/.cue` directory permissions of `0700`. - `~/.cue/config.json` permissions of `0600`. - Validation that the file is owned by the current user and is not a symbolic link. 3. Replace the curl subprocess with a standard-library HTTPS client so the bearer token is transmitted in an HTTP header without appearing in a child process argument vector. 4. Never include authorization headers or API keys in logs, exception messages, telemetry, shell traces, or diagnostic output. 5. Redact secrets from subprocess failures and HTTP error reports. 6. Document key rotation and immediate revocation procedures for potentially exposed credentials. 7. If subprocess-based curl usage is unavoidable, pass a protected temporary curl configuration through a restricted file descriptor or another mechanism that does not expose the token in process arguments, and securely remove any temporary material afterward. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Ssd 2

High
Confidence
98% confidence
Finding
The description explicitly advertises using a remote endpoint to 'automatically bypass Xiaohongshu anti-scraping.' That is a direct instruction to evade platform access controls, which can facilitate unauthorized data extraction and expose operators to legal, policy, and abuse risks.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The privacy section claims the skill does not read local sensitive data, but later instructions and sample commands explicitly read an API key from ~/.cue/config.json. This is a security-relevant inconsistency because it can mislead users about what local data the skill may access and lowers informed consent around secret handling.

External Transmission

Medium
Category
Data Exfiltration
Content
## 解析调用手册

### curl 三步

```bash
# ① 提交解析(记下返回的 operation_id)
Confidence
93% confidence
Finding
The skill sends user-provided Xiaohongshu video links, and potentially returned content, to an external service at mcp.cuecue.cn for parsing. External transmission is central to the skill's function, but it still creates privacy, data-governance, and trust-boundary risks because third-party processing occurs outside the local environment.

Context-Inappropriate Capability

Medium
Confidence
89% confidence
Finding
The skill includes Python and curl examples that read a local API key file and execute subprocesses, plus a documented local-file fallback path. That exceeds the narrow user expectation of 'analyze a Xiaohongshu link' and increases the attack surface by normalizing local file access and command execution within skill guidance.

Static analysis

No suspicious patterns detected.