Back to skill

Security audit

OpenClaw Xiaohongshu MCP

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Xiaohongshu automation, but it should be reviewed because it can post publicly and relies on a persistent unpinned Docker container with account session data.

Install only if you trust the Docker image publisher and are comfortable granting it persistent access to your Xiaohongshu login/session data. Use private visibility for tests, confirm every comment or post manually, consider pinning the container image to a reviewed digest, and avoid passing untrusted text or identifiers into the shell scripts until JSON serialization is fixed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Error
Location
assets/docker-compose.xiaohongshu-mcp.yml:3
Finding

Unpinned Third-Party Container Handles Sensitive Account Data

Content
View full analysis
Remediation
View remediation
``` 2. Record the corresponding source version and image provenance in the setup documentation. 3. Verify image signatures or attestations before deployment where supported. 4. Review the upstream source and build process before selecting a digest. 5. Configure a non-root container user if the image supports it: ```yaml user: ":" ``` 6. Mark mounts as read-only wherever write access is unnecessary. Separate authentication data from general content mounts. 7. Add container hardening controls where compatible: ```yaml read_only: true cap_drop: - ALL security_opt: - no-new-privileges:true ``` 8. Restrict outbound network access to destinations required for legitimate operation. 9. Regularly rotate or invalidate stored sessions after suspected image or supply-chain compromise. 10. Upgrade by explicitly reviewing and replacing the pinned digest rather than automatically following a mutable image reference. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/xhs-comment.sh:19
Finding

Unescaped Input Is Interpolated into MCP JSON Arguments

Content
View full analysis
Remediation
View remediation
&2 exit 1 ;; esac ``` 4. Pass the Boolean safely with `jq`: ```bash ARGS="$( jq -n \ --arg feed_id "$FEED_ID" \ --arg xsec_token "$XSEC_TOKEN" \ --argjson load_all_comments "$LOAD_ALL" \ '{ feed_id: $feed_id, xsec_token: $xsec_token, load_all_comments: $load_all_comments }' )" ``` 5. Apply format and length validation to feed, comment, and user identifiers where their expected syntax is known. 6. Add tests covering quotes, backslashes, newlines, Unicode, empty values, and attempted JSON-property injection. 7. Retain server-side schema validation so unknown properties and duplicate keys are rejected even if a client-side defect is introduced later. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 35)May include surrounding context.

md
./scripts/xhs-detail.sh <feed_id> <xsec_token>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
./scripts/xhs-detail.sh <feed_id> <xsec_token>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

md
./scripts/xhs-comment.sh <feed_id> <xsec_token> "评论内容"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 57)May include surrounding context.

md
./scripts/xhs-comment.sh <feed_id> <xsec_token> "评论内容"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README advertises capabilities to post comments, replies, and publish image posts to an external Xiaohongshu account, but it does not warn users that these actions modify third-party platform content and can affect a real account. In an agent skill context, missing explicit safety and consent guidance increases the risk of accidental unauthorized posting, spam, reputational harm, or unintended account actions when the skill is invoked automatically.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs use of local scripts, local config files, Docker compose files, templates, and logs, which implies file read/write capability, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an unnecessary trust gap: an agent may access or modify local files beyond what a user expects, especially in a skill that interacts with local containers and publishing workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This shell script performs external service calls that transmit user-provided content and identifiers via mcporter, but the only output shown to the user is usage/help text and an installation error. There is no confirmation prompt, no explicit notice before submission, and no inline comment/docstring disclosing that the script will post or reply publicly on Xiaohongshu.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This shell script sends the user's search keyword to an external service via mcporter call xiaohongshu.search_feeds, which is a network/data-transmission operation covered by the warning requirement for code files. Although the script prints usage and selection prompts, it does not disclose that the keyword will be sent to an external service or otherwise warn about the outbound request.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest hard-codes TZ: Asia/Shanghai, which imposes a specific locale/timezone behavior on the skill. This can violate language/locale policy expectations when the skill is not clearly documented as region-specific or offering user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This manifest/template file contains user-facing strings entirely in Chinese, including the title, body, visibility, and tags. Because the file does not offer localization or indicate that it is intended only for a Chinese-language context, it may violate a language/locale policy requiring user choice or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language template fields are written entirely in Chinese ("这里改标题", "这里改正文内容...") and provide no indication that language is optional or configurable. This can violate a language/locale policy when a skill implicitly constrains output language without user opt-in or a documented region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's user-facing output strings are entirely in Chinese, including the dependency error, usage text context, and publish status message. For a general-purpose shell skill, this imposes a specific language on users without opt-in or a documented region-specific justification, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's user-facing messages are hard-coded in Chinese, including the error and usage text. This imposes a specific language on all users without any documented opt-in or locale selection, which matches the natural-language locale policy violation criteria.

Content

No source excerpt is available for this finding.