Back to skill

Security audit

小红书全能运营助手,AI生图 + 草稿发布

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its Xiaohongshu content-automation purpose, but it uses authenticated browser automation and has under-scoped credential and network handling that users should review before installing.

Install only if you are comfortable letting this skill control a logged-in Xiaohongshu creator session through the local OpenClaw browser. Keep any MiniMax configuration pointed only at the official API, avoid untrusted config or content files, review drafts before publishing, and clear generated images or temporary screenshots if they contain sensitive material.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_image.py:43
Finding

Credential-bearing MiniMax requests can be redirected to an arbitrary configured endpoint

Content
View full analysis
{ const req = require('https').request(options, (res) => { let d ...[truncated 2151 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_image_smart.js:420
Finding

Unrestricted image URL retrieval enables blind SSRF-like requests and unbounded downloads

Content
View full analysis
{ const imgs = Array.from(document.querySelectorAll('img')); return imgs .filter(img => img.naturalWidth > 200 && img.naturalHeight > 200) .filter(img => !img.src.includes('data:') && !img.src.includes('base64')) .filter(img => img.src.startsWith('http')) .map(img => img.src); }); const newUrls = [...new Set(currentImgs)] .filter(url => !existingImgs.has(url)); ``` The extracted URLs and redirects are downloaded without destination or response validation: ```javascript for (let i = 0; i < finalUrls.length; i++) { const url = finalUrls[i]; const ext = url.includes('.png') ? 'png' : 'jpeg'; const filename = 'img_' + timestamp + '_' + (i + 1) + '.' + ext; const filepath = path.join(outputDir, filename); try { const http = url.startsWith('https') ? require('https') : require('http'); const file = fs.createWriteStream(filepath); await new Promise((resolve, reject) => { http.get(url, (res) => { if (res.statusCode === 301 || res.statusCode === 302) { http.get(res.headers.location, (res2) => { res2.pipe(file); file.on('finish', () => { file.close(); resolve(); }); }).on('error', reject); } else { res.pipe(file); file.on('finish', () => { file.close(); resolve(); }); } }).on('error', reject); }); const stats = fs.statSync(filepath); if (stats.size > 1000) { savedFiles.push(filepath); } else { fs.unlinkSync(filepath); } } catch (e) { warn('Download failed: ' + e.message); } } ``` ### Technical Analysis The script treats any newly observed HTTP ...[truncated 2582 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_auto.js:375
Finding

Unescaped content is assigned to innerHTML in an authenticated creator session

Content
View full analysis
{ const editor = document.querySelector('.tiptap.ProseMirror'); return editor ? editor.innerText : ''; }); ok('Body: ' + writtenContent.length + ' characters'); if (writtenContent.length === 0 || writtenContent.length < content.length * 0.5) { warn('Clipboard insertion failed; using direct DOM insertion'); await page.evaluate((text) => { const editor = document.querySelector('.tiptap.ProseMirror'); if (editor) { const paragraphs = text.split(/\n\n+/); const html = paragraphs.map(p => { const lines = p.split(/\n/); return '

' + lines.join('
') + '

'; }).join(''); editor.innerHTML = html; editor.dispatchEvent(new Event('input', { bubbles: true })); editor.dispatchEvent(new Event('change', { bubbles: true })); } }, content); const verify2 = await page.evaluate(() => { const editor = document.querySelector('.tiptap.ProseMirror'); return editor ? editor.innerText : ''; }); } ``` ### Technical Analysis If clipboard insertion is unsuccessful or produces less than half of the expected text, the script constructs an HTML string from the supplied post content and assigns it directly to `editor.innerHTML`. The content is not escaped or sanitized. Characters such as `<`, `>`, `"`, and `'` are therefore interpreted as HTML syntax rather than plain text. An attacker-controlled content file can insert arbitrary elements and event-handler attributes into the authenticated Xiaohongshu creator page. Scripts inserted through `innerHTML` generally do not execute directly, but active elements or event handlers may execute when their associated event fires. Actual execution can also be constrained by the site's Content Security Policy. Even with ...[truncated 1631 chars]
Remediation
View remediation
{ if (index > 0) { p.appendChild(document.createElement('br')); } p.appendChild(document.createTextNode(line)); }); editor.appendChild(p); } ``` 4. If HTML input is an explicit feature, sanitize it with a well-maintained strict allowlist that excludes scripts, event attributes, dangerous URL schemes, embedded frames, forms, and active media. 5. Validate the final editor state before saving. Abort if unexpected tags or attributes appear. 6. Treat content files as untrusted input and clearly document that externally sourced templates must be reviewed before browser automation. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (15)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly advertises automatic QR-code login behavior but does not warn users about the privacy and account-security implications of automating an authentication flow. In the context of a tool that uploads content to a real social-media account, this can mislead users into granting browser automation access to authenticated sessions, cookies, or login state without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

SQP-3 applies to all file types and includes language/locale policy violations. The skill is presented entirely in Chinese and includes fixed Chinese interaction wording such as replying with "发布" or "否", but it does not offer user language opt-in or explain that the skill is intentionally limited to a Chinese-language, region-specific workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly describes automated QR-code login prompting, browser automation, image URL extraction, and automatic download/save behavior without clear consent gates, privacy disclosure, or system-effect warnings. In a skill that drives a real creator account and writes files locally, these actions can expose account/session data, trigger unintended platform actions, or save untrusted remote content to disk without the user fully understanding the consequences.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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 · scripts/generate_image.py (reported line 65)May include surrounding context.

python
print(f"  数量: {n}")

    try:
        response = requests.post(url, headers=headers, json=data, timeout=120)
        response.raise_for_status()
        result = response.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically connects to a local browser via CDP, opens an external site, submits user-provided prompts, and then downloads generated images to disk without any explicit consent or warning at the point of action. This creates a privacy and safety risk because sensitive prompts may be transmitted to third-party services and files may be created locally as a side effect the user did not knowingly approve.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level title '小红书草稿自动化发布脚本' suggests automated publishing, yet the workflow clicks '暂存离开', reports that the draft was saved, and never clicks a publish control. This is a direct intent mismatch in the file's own documentation/name versus implemented behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The header comments and help text describe behavior around publishing after draft save, implying an automated follow-up publish capability. In practice, after saving the draft the script only prints a prompt, returns awaitingPublish=true, and exits with code 42 without implementing any publish step in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The logger hard-codes the locale to 'zh-CN', and the rest of the script's user-facing help and prompts are entirely in Chinese. This imposes a specific language/locale on all users without offering a choice or explaining a region-specific requirement, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Natural-language policy violations include forcing a specific language without user opt-in. This README is entirely Chinese-language and does not indicate that the skill is region-specific or provide an alternative language option, which can amount to an undocumented language constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file presents all headings, instructions, and examples exclusively in Chinese. Under the policy rules, forcing a specific language without user opt-in can be a natural-language policy violation when no language choice or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file contains natural-language instructions and examples exclusively in Chinese, which can amount to a language/locale constraint. The policy requires either user choice or a clearly documented justification for restricting the skill to a specific language or locale, neither of which appears in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing instructional content solely in Chinese, but does not indicate that the skill or reference is language-specific or provide any opt-in for locale preference. Under the policy, forcing a specific language without user choice can be a natural-language policy violation unless the locale constraint is documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script’s docstring, CLI help text, and runtime messages are all hard-coded in Chinese, including usage guidance and error output. This creates a locale policy concern because the skill forces a specific language without any user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The logging timestamp is explicitly formatted with the zh-CN locale, which hard-codes a language/locale choice into the skill behavior. The file does not provide an opt-in, configuration, or justification for restricting locale formatting to Chinese.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This shell script presents all user-facing messages and instructions in Chinese, including errors, warnings, and next steps. That creates a language/locale policy concern because the skill appears to force a specific language without user opt-in or a stated regional limitation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.