T09 · Insecure Skill Coding Practices
- Location
data/cookies.json:1- Finding
Authentication credentials and session tokens are distributed with the package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does automate Xiaohongshu, but it ships account cookies and exposes account-changing tools too broadly, so it needs careful review before use.
Do not install or run this version against any real account until the bundled cookies are removed and rotated, the package excludes credential data, the MCP server binds only to localhost or requires strong authentication, and publish/comment/delete actions require explicit user approval. Treat any included Xiaohongshu session as exposed.
data/cookies.json:1Authentication credentials and session tokens are distributed with the package
scripts/index.js:331Unauthenticated MCP service exposes account-control operations on all network interfaces
scripts/xhs-tools.js:536Caller-controlled local file paths are uploaded without path restrictions
scripts/browser.js:33Chromium sandbox, same-origin enforcement, and site isolation are disabled
scripts/browser.js:81Authentication cookies are stored in plaintext without explicit restrictive permissions
package.json:31Dependency versions are mutable and installations are not reproducible
scripts/ensure-service.js:70Service shutdown command can forcibly terminate unrelated Node.js processes
The description promises a comprehensive Xiaohongshu automation assistant with full XHS operational abilities and an MCP server. However, this code chunk is a progressive/test MCP server that mainly initializes transport, exposes /mcp and /health endpoints, registers a basic ping tool, and optionally a check_login_status tool from another file. Based on the supplied code alone, the implemented behavior is limited to server scaffolding and login-status checking, not full RED/XHS actions like posting notes, searching notes, or operations management. This is a material underimplementation relative to the declared purpose, so it is a mismatch.
The declared description presents a full Xiaohongshu automation assistant with broad platform operation capabilities and an MCP server. The supplied code chunk does not implement any XHS-specific logic, API interaction, browser automation, note management, or server behavior. Instead, it is a generic utilities module. While utility code can support a larger XHS tool, this chunk by itself does not accurately represent the declared purpose and is materially more limited than described.
Referenced artifact was not completely inspected
import { searchFeeds, likeFeed, publishContent } from './scripts/xhs-tools.js';
Referenced artifact was not completely inspected
import { searchFeeds, likeFeed, publishContent } from './scripts/xhs-tools.js';
Referenced artifact was not completely inspected
import { searchFeeds, likeFeed, publishContent } from './scripts/xhs-tools.js';
The file contains live authenticated Xiaohongshu session material, including access tokens, session identifiers, and account-linked cookies that can enable unauthorized access to the associated account. Bundling these secrets inside a distributable automation skill is dangerous because anyone who obtains the skill files may reuse the session to act as the account owner, exfiltrate data, or perform posting and account-management actions.
The publishing functions can create public posts and upload local files, yet the documentation lacks warnings about visibility, permanence, and the sensitivity of local file paths/content being transmitted. In the context of an XHS automation skill, this is particularly dangerous because a mistaken invocation can immediately disclose private media or publish unintended content to a wide audience.
This publication tool can create real posts and accepts image inputs from either HTTP URLs or local absolute paths, increasing risk beyond ordinary posting. In an agent context, that combination can lead to unintended public publication and possible local file disclosure or unauthorized use of remote content if upstream validation is weak.
This tool uploads a local video file and publishes content directly to an external social-media platform without any explicit warning or confirmation mechanism. Because it operates on local absolute paths, an agent could be induced to exfiltrate sensitive local media and publish it under the user's account, causing both data exposure and reputational damage.
This function posts a comment directly to an external platform using the currently authenticated account without any confirmation, preview, or policy guard. In an agent-driven environment, unreviewed content submission can cause account abuse, spam, reputational damage, or accidental disclosure if triggered by prompt injection or ambiguous user instructions.
This workflow replies to another user's comment using the logged-in account with no confirmation or preview of the outbound message. Because it performs an external side effect tied to a real identity, it is vulnerable to misuse by malicious prompts, unintended automation, or social-engineering chains that cause unauthorized posting.
The publishing workflow uploads local image files and publishes a post to Xiaohongshu immediately after form filling, without explicit user approval at the point of no return. This creates a serious risk of accidental public posting, sensitive file disclosure, reputational harm, and abuse through prompt injection because both local data exfiltration and public account actions are involved.
This function uploads a local video file and publishes it externally without a confirmation checkpoint, combining local file access with irreversible external account actions. In the context of a social-media automation skill, that significantly increases the danger of private media leakage, unauthorized posting, and account misuse from unsafe or manipulated prompts.
The skill advertises executable setup and service behavior and exposes environment-variable-based configuration, but it does not declare any tool scope or permission boundaries. In an agent setting, missing scope metadata can allow broader-than-expected execution context or make review and policy enforcement harder, increasing the chance of unintended access or behavior.
The trigger condition is extremely broad, covering nearly any mention of Xiaohongshu, posting, searching, or operations, which can cause the skill to activate in ordinary conversation without clear user intent. Because the skill includes account-affecting actions and service startup behavior, accidental invocation could lead to privacy exposure, unnecessary network activity, or unintended state-changing operations.
The skill exposes actions that modify account state—liking, favoriting, commenting, replying, and publishing—but the documentation does not require explicit user confirmation or warn about irreversible or policy-sensitive effects. In the context of a social-media automation skill, this is more dangerous because mistaken or coerced execution can directly post content, interact publicly, or alter the user's account behavior.
The documented delete_cookies() operation destroys the active login session but provides no warning, confirmation requirement, or guidance about its irreversible effect on the current authenticated state. In an automation skill, this can lead to unintended logout, workflow disruption, and possible account recovery friction if invoked by mistake or through ambiguous user prompting.
The API exposes account-modifying actions such as liking, favoriting, commenting, and replying without any user-facing warning that they will perform live interactions on a real account. Because this skill is specifically for social-media automation, these operations can generate unintended public activity, reputational harm, spam-like behavior, or platform policy violations if triggered without clear consent.
The batch example performs repeated automated likes across multiple search results and keywords but does not warn that it will carry out live, repeated account actions. In a social-platform automation context, this increases the risk of accidental mass interaction, spam patterns, account restriction, and unintended manipulation of platform activity.
The stop operation uses a force-kill command (taskkill /F) against matching node.exe processes, which is a destructive action that can terminate running work. Although the script logs after execution, there is no prior warning, confirmation, or explanatory comment disclosing the risk of forcibly stopping processes.
The skill exposes a cookie-deletion action as a callable tool with no confirmation, warning, or friction. In an MCP/agent setting, that can let an agent or prompt-triggered workflow silently destroy the user's authenticated session, causing denial of service for the automation and potentially forcing re-login flows at unsafe times.
The file contains user-facing natural-language descriptions and runtime log messages in Chinese, such as the header comments and tool descriptions, with no indication that the skill is intended only for Chinese-speaking users or that another language option is available. This can violate language/locale policy because it effectively forces a specific language without user opt-in.
The server logs the full POST body for every incoming /message request, which can expose sensitive user data, MCP tool arguments, authentication material, cookies, or operational content to console logs and downstream log collectors. In this skill context, the service automates account actions for XiaoHongShu, so requests may contain private prompts, session-related data, or publishing content, making indiscriminate request logging a real confidentiality risk.
This tool posts comments to an external platform and performs an irreversible state-changing action with no built-in confirmation, approval gate, or user-warning mechanism in this file. In an agent-driven environment, ambiguous or prompt-injected instructions could cause unintended comments to be published from the user's authenticated account.
This reply tool can publish replies to existing comments without any explicit safety interlock or confirmation path. Because the service automates actions on a real social-media account, misuse or misinterpretation by an LLM agent could generate unwanted public interactions, reputational harm, or policy violations.
Detected: suspicious.dangerous_exec, suspicious.env_credential_access