Back to skill

Security audit

Easy Xiaohongshu

Security checks for vulnerabilities and agentic risk

Overview

The skill’s Xiaohongshu content generation is mostly coherent, but it includes under-disclosed background auto-sync and weak API-key storage that could commit secrets or unintended files.

Review this skill before installing. Use it only if you are comfortable sending prompts and generated images to the configured API/MCP services, storing an API key locally, and posting to a real Xiaohongshu account. Do not run setup-auto-sync.sh unless you explicitly want a recurring background job that commits repository changes; keep config/local-config.json out of Git and use a restricted, revocable API key.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
setup-auto-sync.sh:11
Finding

Undocumented macOS LaunchAgent Creates Persistent Background Execution

Content
View full analysis
"$LAUNCH_AGENT_PLIST" << EOF Label com.easy-xhs.auto-sync ProgramArguments $SYNC_SCRIPT StartInterval 300 StandardOutPath /tmp/easy-xhs-sync.log StandardErrorPath /tmp/easy-xhs-sync.err EOF # Load the LaunchAgent launchctl unload "$LAUNCH_AGENT_PLIST" 2>/dev/null launchctl load "$LAUNCH_AGENT_PLIST" ``` The registered task executes the following repository modification logic: ```bash # auto-sync.sh:6-18 cd "$SCRIPT_DIR" # Check if there are any changes if git diff --quiet && git diff --cached --quiet; then echo "✅ No changes to sync" exit 0 fi # Add all changes git add -A # Create commit with timestamp TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S") git commit -m "Auto-sync: Changes at $TIMESTAMP" ``` ### Technical Analysis The setup script writes a LaunchAgent into the current user's `~/Library/LaunchAgents` directory and loads it with `launchctl`. The agent invokes `auto-sync.sh` every 300 seconds and therefore continues running across ordinary Skill invocations and user sessions. This behavior is not necessary for the Skill's declared content-generation, image-generation, or Xiaohongshu publishing functions. It is also absent from the reviewed ` ...[truncated 1964 chars]
Remediation
View remediation
/dev/null || true rm -f "$HOME/Library/LaunchAgents/com.easy-xhs.auto-sync.plist" ``` 7. Prefer a modern, scoped `launchctl bootstrap`/`bootout` lifecycle where supported, while still requiring explicit consent. 8. Use a private application log directory with restrictive permissions rather than predictable files under `/tmp`. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
install.sh:64
Finding

Plaintext API Key Can Be Automatically Added to Git History

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (56)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README advertises end-to-end automation through one-click publishing and later describes saved login sessions, but it does not prominently warn users about the security and privacy implications of automatic posting and persistent session storage. In this context, the omission is significant because the skill interfaces with a local MCP publishing service and can act on a real social-media account, so accidental or unauthorized posts could have account, reputational, and privacy consequences.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger example is a natural-language request that closely resembles an ordinary user ask, which can cause the skill to activate unintentionally when a user is merely discussing or brainstorming Xiaohongshu content. In this skill, unintended activation is more dangerous because the documented workflow includes downstream content generation, image generation, and possible publishing steps, increasing the chance of unexpected external actions or costs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script stages all repository changes with git add -A and immediately creates a commit without any user confirmation, scope restriction, or review step. In an agent/skill context, this is dangerous because it can silently persist unintended changes, including sensitive files, generated artifacts, or attacker-influenced modifications, altering version-control state in a way the user may not notice until later.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The default user preference values are specified only in Chinese (e.g. account type, content direction, target audience), which can effectively force a specific language/locale in downstream skill behavior. Because this is a config file and there is no accompanying indication of user-selectable locale or opt-in, it may violate the policy against imposing a language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The HTML declares lang="zh-CN", and the visible skill description is entirely Chinese, presenting the skill as operating in a fixed language/locale. There is no indication that users can opt into another language or that the locale restriction is required for a documented region-specific compliance reason.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The installer prompts for an API key and writes it into a local JSON config file without clearly warning the user that the secret will be stored on disk in plaintext. This increases the risk of credential exposure through local compromise, backups, overly broad file permissions, or accidental inclusion in source control.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · install.sh (reported line 155)May include surrounding context.

sh
# 5. 检查 MCP 服务
echo ""
echo "🔌 检查 xiaohongshu-mcp 服务..."
if command -v curl &> /dev/null; then
    if curl -s http://localhost:18060/mcp > /dev/null 2>&1; then
        echo "✅ MCP 服务运行中"
    else

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · install.sh (reported line 160)May include surrounding context.

sh
echo "✅ MCP 服务运行中"
    else
        echo "⚠️  MCP 服务未响应,发布功能需要 xhs-mac-mcp 技能"
        echo "   参考:~/clawd/skills/xhs-mac-mcp/SKILL.md"
    fi
else
    echo "⚠️  未找到 curl,跳过 MCP 检查"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire template is written to generate Xiaohongshu post copy in Chinese, with no option for the user to select another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The hashtag library is entirely composed of Chinese category labels and predominantly Chinese hashtags, with no indication that this locale is optional or region-specific. This can violate language/locale policy because it hard-codes one language experience rather than offering user choice or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The instruction "中文必须为简体中文" forces a specific language/locale in the generated content. Under the policy, locale constraints should either be optional for the user or clearly justified as region-specific; this template provides neither.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This JSON file defines all preset styles, descriptions, tones, cover styles, and theme mappings in Chinese, such as "科技博主", "亲子博主", and Chinese keyword mappings. Because the file provides no alternative language options or opt-in mechanism, it imposes a specific language/locale across the skill's natural-language configuration.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The publish subcommand directly invokes the external posting action with user-supplied title, content, images, and tags, and there is no interactive confirmation, dry-run gate, or explicit warning before posting. In an automation-oriented CLI that can generate and then immediately publish content, this increases the risk of accidental unauthorized or unintended publication to a real external account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The ConfigError messages are written in Chinese, which imposes a specific language on users encountering these errors. There is no indication in this file that the skill is region-specific or that users can opt into the language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The hardcoded instruction text requires the assistant to behave as a Xiaohongshu content planner and respond in Chinese, with no opt-in or alternative locale handling visible in this file. This is a natural-language locale policy concern because it imposes a specific language unconditionally.

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/easy_xhs/content.py (reported line 54)May include surrounding context.

python
last_error = None
    for attempt in range(retries):
        try:
            resp = requests.post(url, json=payload, headers=headers, timeout=timeout)
            resp.raise_for_status()
            data = resp.json()
            break

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/easy_xhs/image.py (reported line 71)May include surrounding context.

python
last_error = None
    for attempt in range(retries):
        try:
            resp = requests.post(url, json=payload, headers=headers, timeout=timeout)
            resp.raise_for_status()
            data = resp.json()
            break

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The function posts a prompt containing user-supplied fields such as account type, audience, and topic to a remote Gemini API endpoint. In this file there is no confirmation prompt, log/message, or comment/docstring warning that user content will be transmitted off-system.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code constructs a remote API URL and posts the composed prompt content to it, which transmits user-provided text and style data over the network. In this file there is no confirmation prompt, print/log disclosure, or comment/docstring warning that prompt contents will be sent to an external service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This file transmits structured content and, elsewhere in the flow, base64-encoded local images to a remote URL defined by configuration. In a skill/agent setting, external transmission is security-relevant because a misconfigured, malicious, or user-supplied MCP endpoint could receive sensitive local content without sufficient trust checks or user awareness.

Content

Scanner excerpt · scripts/easy_xhs/publish.py (reported line 17)May include surrounding context.

python
def post_json(url: str, payload: Dict[str, Any], headers: Optional[Dict[str, str]] = None, timeout: int = 30):
    resp = requests.post(url, json=payload, headers=headers or DEFAULT_HEADERS, timeout=timeout)
    resp.raise_for_status()
    return resp

Tainted flow: 'headers' from requests.post (line 70, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/easy_xhs/publish.py (reported line 17)May include surrounding context.

python
def post_json(url: str, payload: Dict[str, Any], headers: Optional[Dict[str, str]] = None, timeout: int = 30):
    resp = requests.post(url, json=payload, headers=headers or DEFAULT_HEADERS, timeout=timeout)
    resp.raise_for_status()
    return resp

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code reads arbitrary local image files, base64-encodes them, and sends them to a remote MCP service without any consent prompt, destination validation, or warning at this layer. In an agent skill context, this increases the risk of unintended local data exfiltration if image paths are influenced by user input, other tools, or a malicious MCP endpoint configuration.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file embeds Chinese-only account-type keywords and labels such as '科技博主', '亲子博主', and similar mappings, which steers behavior toward a specific language/locale. There is no natural-language indication in this file that users can opt into this locale or choose an alternative language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script passes prompts derived from user-provided content into generate_images(...), which likely sends them to an external image-generation backend, but it provides no explicit user warning, consent step, or data-handling notice. This can lead to unintended disclosure of sensitive or proprietary prompt content to third-party services, especially when the input file contains private material.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

This finding points to the same persistence behavior: defining a plist path in the user's LaunchAgents directory is preparatory to automatic execution. In an agent skill context, hidden or poorly explained persistence increases risk because users may not realize code will continue running every login/session.

Content

Scanner excerpt · setup-auto-sync.sh (reported line 12)May include surrounding context.

sh
# Create LaunchAgent for macOS
LAUNCH_AGENT_DIR="$HOME/Library/LaunchAgents"
LAUNCH_AGENT_PLIST="$LAUNCH_AGENT_DIR/com.easy-xhs.auto-sync.plist"

mkdir -p "$LAUNCH_AGENT_DIR"

Static analysis

No suspicious patterns detected.