Back to skill

Security audit

xiaohongshu-skill

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its Xiaohongshu automation purpose, but it needs Review because some real-account and local-file actions are under-scoped.

Install only if you are comfortable giving this skill control of a Xiaohongshu browser session and local account state. Use a dedicated account, avoid custom --cookie paths, inspect or remove ~/.xiaohongshu/stealth.js before use, require a fresh explicit confirmation before every write action, and prefer pinned/provenance-checked installation over live Git installs.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/login.py:311
Finding

Arbitrary File Deletion Through the Unrestricted Cookie Path

Content
View full analysis

Vulnerability Details

File Location: scripts/__main__.py:58-65, scripts/__main__.py:181-187, scripts/__main__.py:576, and scripts/login.py:311-323
Vulnerability Type: Unrestricted filesystem path used in a destructive operation
Risk Level: High

Vulnerable Code

python
def _cookie_path(args) -> str:
    profile = _profile(args)
    paths = profile_paths(profile)
    if profile:
        os.environ["XHS_PROFILE"] = profile
    if getattr(args, "cookie", None):
        return args.cookie
    return str(paths.cookie_path)
python
def cmd_logout(args):
    """Delete login state."""
    result = login.logout(
        cookie_path=_cookie_path(args),
        user_data_dir=_user_data_dir(args),
    )
    print(format_output(result))
    return 0
python
parser.add_argument("--cookie", "-c", help="Cookie file path", default=None)
python
def logout(cookie_path=None, user_data_dir=None):
    """Delete persistent browser data and the cookie file to reset login state."""
    import shutil

    paths = profile_paths(env_profile())
    data_dir = user_data_dir or str(paths.user_data_dir)
    if os.path.exists(data_dir):
        shutil.rmtree(data_dir)

    path = cookie_path or DEFAULT_COOKIE_PATH
    if os.path.exists(path):
        os.remove(path)

    strategy_file = os.path.join(
        os.path.expanduser("~"),
        ".xiaohongshu",
        "strategy.json",
    )
    if os.path.exists(strategy_file):
        os.remove(strategy_file)

    return {"status": "ok", "message": "Login state cleared"}

Technical Analysis

The global --cookie option accepts an arbitrary filesystem path. _cookie_path() returns that path without canonicalization, ownership verification, extension checking, symlink rejection, or enforcement that it resides inside a Skill-managed profile directory.

The logout command passes this unrest ...[truncated 1680 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not permit the global --cookie override to select the deletion target for logout.
  2. Derive logout targets exclusively from a validated profile name and the configured Skill state root.
  3. Resolve both the candidate path and allowed root with Path.resolve() and verify that the candidate is strictly beneath the allowed root.
  4. Reject symlinks and unexpected file types before deletion.
  5. Require the target filename to match the expected cookie filename, such as cookies.json.
  6. Refuse to delete an existing file unless its structure is a valid Skill cookie backup.
  7. Add an explicit destructive-operation confirmation that displays the canonical target.
  8. Add regression tests covering absolute paths, .. traversal, symlinks, profile-root paths, and unrelated existing files.

A hardened design should resemble:

python
allowed_root = profile_root.resolve()
target = paths.cookie_path.resolve()

if target.parent != allowed_profile_directory.resolve():
    raise ValueError("Cookie deletion target is outside the selected profile")

if target.is_symlink() or target.name != "cookies.json":
    raise ValueError("Invalid cookie deletion target")

T09 · Insecure Skill Coding Practices

Error
Location
scripts/client.py:328
Finding

Arbitrary File Overwrite Through Cookie Backup Persistence

Content
View full analysis

Vulnerability Details

File Location: scripts/__main__.py:58-65, scripts/__main__.py:576, scripts/client.py:80-92, scripts/client.py:328-338, and scripts/session_store.py:21-41
Vulnerability Type: Unrestricted file write and atomic replacement
Risk Level: High

Vulnerable Code

python
def _cookie_path(args) -> str:
    profile = _profile(args)
    paths = profile_paths(profile)
    if profile:
        os.environ["XHS_PROFILE"] = profile
    if getattr(args, "cookie", None):
        return args.cookie
    return str(paths.cookie_path)
python
self.cookie_path = cookie_path or str(paths.cookie_path)
self.user_data_dir = user_data_dir or str(paths.user_data_dir)
self.session_path = str(
    paths.session_path
    if cookie_path is None
    else os.path.join(os.path.dirname(self.cookie_path), "session.json")
)
python
def _save_cookies(self):
    """Atomically save cookies in the legacy JSON-array format."""
    if not self.context:
        return

    try:
        cookies = self.context.cookies()
        atomic_write_json(self.cookie_path, cookies)
        log.info("Saved %d cookies to backup", len(cookies))
    except Exception:
        log.warning("Unable to save cookie backup")
python
def atomic_write_json(path: str | Path, value: Any) -> None:
    """Write JSON by replacing a temporary file in the same directory."""
    target = Path(path)
    target.parent.mkdir(parents=True, exist_ok=True)
    fd, temp_name = tempfile.mkstemp(
        dir=target.parent,
        prefix=f".{target.name}.",
        suffix=".tmp",
    )
    temp_path = Path(temp_name)
    try:
        try:
            os.chmod(temp_path, 0o600)
        except OSError:
            pass
        with os.fdopen(fd, "w", encoding="utf-8") as handle:
            json.dump(value, handle, ensure_ascii=False, indent=2)
            handle.write("\n
...[truncated 2890 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove unrestricted custom cookie destinations from normal CLI operation.
  2. Store cookie backups only in profile directories produced by profile_paths().
  3. Canonicalize the destination and enforce containment beneath the configured Skill state root.
  4. Reject symlinks for both the destination and all relevant parent path components.
  5. Do not create arbitrary parent directories for security-sensitive state files.
  6. Before replacing an existing file, verify that it is a regular file with the expected name and recognized Skill-owned format.
  7. Open and replace files using platform-appropriate no-follow and ownership checks where available.
  8. Keep restrictive file permissions, but also apply restrictive permissions to newly created profile directories.
  9. Add tests proving that custom absolute paths, traversal paths, symlinks, and unrelated files cannot be written.

If custom import/export is necessary, separate it from the live persistence path. An explicit export command should refuse existing targets by default and should never be reused automatically during client shutdown.

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/client.py:116
Finding

Automatic Execution of an Unverified Local JavaScript Override in Authenticated Browser Sessions

Content
View full analysis

Vulnerability Details

File Location: scripts/client.py:75, scripts/client.py:116-130, and scripts/client.py:275-283
Vulnerability Type: Untrusted local tool hook executed in browser pages
Risk Level: Medium

Vulnerable Code

python
STEALTH_JS_PATH = os.path.join(
    os.path.expanduser("~"),
    ".xiaohongshu",
    "stealth.js",
)
python
def _load_stealth_js(self, seed: str) -> str:
    """Build stealth JS from a stable profile seed and optional local overrides."""
    seed_number = int.from_bytes(
        hashlib.sha256(seed.encode("utf-8")).digest()[:4],
        "big",
    )
    js = self.STEALTH_JS.replace(
        "__XHS_FINGERPRINT_SEED__",
        str(seed_number),
    )
    if os.path.exists(self.STEALTH_JS_PATH):
        try:
            with open(self.STEALTH_JS_PATH, "r", encoding="utf-8") as handle:
                external = handle.read()
            if external.strip():
                js += "\n// === External stealth.js overrides ===\n" + external
                log.info("Loaded external stealth.js overrides")
        except Exception:
            log.warning("Unable to load external stealth.js overrides")
    return js
python
seed = resolve_fingerprint_seed(self.session_path)
self._stealth_js = self._load_stealth_js(seed)

self.context = self.playwright.chromium.launch_persistent_context(
    user_data_dir=self.user_data_dir,
    headless=self.headless,
    viewport={"width": 1920, "height": 1080},
    user_agent=(
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
        "AppleWebKit/537.36 (KHTML, like Gecko) "
        "Chrome/135.0.0.0 Safari/537.36"
    ),
    locale="zh-CN",
    timezone_id="Asia/Shanghai",
    args=browser_args,
    ignore_default_args=["--enable-automation"],
)

self.context.add_init_script(self._stealth_js)

Technical Analysis

The client automatically checks a ...[truncated 2828 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove automatic loading of ~/.xiaohongshu/stealth.js.
  2. If an override is genuinely required, make it an explicit per-run opt-in such as --stealth-script.
  3. Display the canonical script path and a prominent warning before launching an authenticated context.
  4. Verify that the file is a regular file, is not a symlink, is owned by the current user, and is not writable by group or other users.
  5. Consider requiring a configured SHA-256 digest or cryptographic signature.
  6. Do not load custom JavaScript in authenticated production sessions by default.
  7. Restrict custom scripts to explicitly approved origins rather than injecting them into every page.
  8. Record the loaded script's digest in diagnostics without logging its contents.
  9. Add tests covering symlinks, permissive permissions, unexpected ownership, changed hashes, and absent user consent.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/__main__.py:243
Finding

State-Changing Account Operations Do Not Enforce User Confirmation in Code

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:29-34, scripts/__main__.py:243-365, and scripts/__main__.py:669-710
Vulnerability Type: Missing authorization and confirmation gate for sensitive actions
Risk Level: Medium

Vulnerable Code

The Skill instructions state that account mutations require explicit confirmation:

markdown
Publishing, commenting, replying, liking, collecting, unliking, and
uncollecting change the real account state. Before execution:

1. Display the target account, content, media, and operation type.
2. Obtain explicit user confirmation.
3. Execute only the single operation confirmed by the user.

However, the command handlers invoke the operations directly:

python
def cmd_comment(args):
    """Post a comment."""
    result = comment.post_comment(
        feed_id=args.feed_id,
        xsec_token=args.xsec_token or "",
        content=args.content,
        headless=_headless(args),
        cookie_path=_cookie_path(args),
    )
    print(format_output(result))
    return 0 if result.get("status") == "success" else 1
python
def cmd_reply(args):
    """Reply to a comment."""
    result = comment.reply_to_comment(
        feed_id=args.feed_id,
        xsec_token=args.xsec_token or "",
        comment_id=args.comment_id,
        reply_user_id=args.reply_user_id,
        content=args.content,
        headless=_headless(args),
        cookie_path=_cookie_path(args),
    )
    print(format_output(result))
    return 0 if result.get("status") == "success" else 1
python
def cmd_like(args):
    """Like a post."""
    result = interact.like(
        feed_id=args.feed_id,
        xsec_token=args.xsec_token or "",
        headless=_headless(args),
        cookie_path=_cookie_path(args),
    )
    print(format_output(result))
    return 0 if result.get("status") == "success" else 1
python

...[truncated 2982 chars]
Remediation
View remediation

Remediation Suggestions

  1. Implement a two-phase prepare-and-execute workflow for every state-changing operation.
  2. During preparation, return a normalized summary containing:
    • Selected profile or account.
    • Operation type.
    • Target feed, comment, or user.
    • Exact comment or reply content.
    • Relevant media or metadata.
  3. Generate a short-lived, single-use confirmation token cryptographically bound to that normalized summary.
  4. Require the token for execution and reject expired, reused, or mismatched tokens.
  5. Ensure one token authorizes exactly one operation.
  6. Fail closed when confirmation data is absent.
  7. Retain --auto-publish only as part of the same confirmation model rather than treating a boolean as sufficient authorization.
  8. Add tests proving that all mutation commands fail before interacting with the browser when no valid confirmation is supplied.
  9. Add tests for token replay, changed content, changed targets, changed profiles, expiration, and multi-operation attempts.
  10. Clearly distinguish read-only commands from state-changing commands in CLI output and documentation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (100)

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
86% confidence
Finding

The README instructs users to install directly from a GitHub repository via pip install git+https://..., which executes package build/install logic from a remote source without a pinned immutable version. In an agent-skill context, where users may follow setup commands automatically or semi-automatically, this increases supply-chain risk if the repository, dependency chain, or referenced branch is ever compromised.

Content

Scanner excerpt · README_EN.md (reported line 65)May include surrounding context.

lls CLI

bash
npx skills add DeliciousBuding/xiaohongshu-skill

Reproducible local environment

bash
git clone https://github.com/DeliciousBuding/xiaohongshu-skill.git
cd xiaohongshu-skill
uv sync --frozen --no-dev
uv run playwright install chromium

Development environment:

bash
uv sync --frozen --group dev
uv run python -m scripts.quality check

Global CLI

bash
pip install git+https://github.com/DeliciousBuding/xiaohongshu-skill.git
playwright install chromium
xiaohongshu-skill --help

Docker

bash
docker compose build
docker compose run --rm xiaohongshu qrcode --headless=false

See installation guide for system and platform details.

Quick start

1. Login

bash
uv run python -m scripts qrcode --headless=false
uv run python -m scripts check-login

2. Search and read

bash
uv run python -m scripts search "coffee" --limit=5
uv run python -m scripts feed <feed_id> <xsec_token>
uv run python -m scrip

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a social-media automation agent for Xiaohongshu with browser-based interaction and write operations. The supplied code does none of that. It is a standalone documentation checker that walks local files/directories, reads text files, matches regexes for privacy and writing issues, prints findings, and returns an error code when issues are found. This is a materially different primary purpose and behavior, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill is an AI agent for Xiaohongshu automation and content operations. However, the supplied code is only a command-line utility for running repository maintenance tasks such as docs checks, linting, pytest, contract checks, and serving a local site. Its primary purpose is materially different from the declared purpose, and it does not implement any of the stated social-platform capabilities. This is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is for a Xiaohongshu automation agent, but the supplied code is a standalone release-version consistency checker. It only parses command-line arguments, reads pyproject.toml, compares version strings, and prints validation results. There is no evidence of any Xiaohongshu-related behavior, Playwright automation, content operations, session handling, JSON-oriented agent output, or write-confirmation flow. The primary purpose is materially different, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes an operational Xiaohongshu automation skill with read/write platform actions and confirmation-gated writes. The supplied code does none of that. It only parses local site files and validates metadata/content for a GitHub Pages website, including title, meta description, canonical URL, og:image, alternate links, JSON-LD, robots.txt, sitemap.xml, and required discovery/install strings. This is a materially different primary purpose and capability set, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a full Xiaohongshu automation agent with browser-based platform actions and guarded write operations. The supplied code does none of that. It only validates Agent Skill frontmatter in a SKILL.md file by parsing metadata and checking it with a validator. There is no network access, no Playwright usage, no Xiaohongshu-specific logic, no content operations, and no confirmation flow for write actions. This is a clear material mismatch in primary purpose and capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

There is a material description-behavior mismatch. The description presents a full Xiaohongshu automation skill with Playwright-based search, reading, session management, and write operations. The supplied code chunk is narrower: it is an SOP planner/orchestrator that creates plans for publishing, replying, and feed engagement, performs validation/quota checks, and estimates timing. The docstrings explicitly state that browser actions are not performed and that actual execution must be handled by other modules. That is a materially different behavior from a full operational automation agent. Additionally, the declared safety property that any write action must require user confirmation is not concretely enforced in this chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

There is a material mismatch between the declared purpose and the actual code. The description presents a full Xiaohongshu automation agent that interacts with the platform via Playwright and performs platform actions. This code chunk instead provides supporting local business-logic for运营策略: configuration persistence, quota checks, action counting, and editorial calendar management. While strategy management could be related to Xiaohongshu operations, this chunk lacks the core declared capabilities (browser automation, search/reading content, login/session handling, publishing, commenting, liking, collecting, and write-confirmation enforcement). It also introduces undeclared local file persistence behavior as a primary function of the chunk. Therefore the description does not accurately represent what this code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description promises an end-to-end Xiaohongshu automation agent with platform interaction capabilities, including reading/searching content and performing write actions on the service. The actual code only defines static template data and helper methods for generating post titles, drafting content structures, suggesting hashtags, and validating length constraints. This is a materially different primary purpose and omits the core declared behaviors. There are no network calls, browser controls, authentication flows, or action-confirmation mechanisms in this chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is for a full Xiaohongshu automation agent with significant browser-driven platform interactions and guarded write actions. The supplied code does not implement any of those capabilities. Instead, it checks whether live tests should run based on an environment variable and provides a skip message. This is a materially different primary purpose from the declared skill behavior, so the description does not accurately represent this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is for a social-media automation agent targeting Xiaohongshu with browsing, login/session management, and content publishing/engagement capabilities. The actual code chunk contains only unit tests for documentation scanning utilities and does not interact with Xiaohongshu, Playwright, login sessions, posting, reading social content, or user-confirmation flows. This is a clear material mismatch in primary purpose and implemented capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code does not implement or directly support the declared Xiaohongshu agent capabilities. Instead, it is a small test file focused on controlling execution of live tests through an environment variable. Its primary purpose is unrelated to searching/reading Xiaohongshu content, managing sessions, or performing user-confirmed write actions. While test infrastructure can be ancillary to a larger project, this specific chunk’s behavior is materially different from the declared skill description, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a full Xiaohongshu automation agent with browser-based actions and social platform interactions. The supplied code chunk does not implement or exercise any Xiaohongshu-specific functionality, Playwright automation, content operations, or user-confirmation logic. Instead, it is a unit test module for local profile/session path handling and profile discovery on the filesystem. While profile/session management could be a supporting detail of a larger agent, this chunk alone is materially different in purpose and behavior from the declared skill description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is about an AI agent skill that automates Xiaohongshu platform interactions. The actual code chunk does not implement or exercise Xiaohongshu search, login, posting, commenting, liking, favoriting, JSON output, or user-confirmation safeguards. Instead, it contains unit tests for a quality script that runs documentation/site/lint/pytest/contracts/selectors/skill checks, sets an environment variable for a live task, and serves a local site on a chosen port. This is a materially different primary purpose and unrelated functionality, so it is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill automates Xiaohongshu/RedNote actions such as searching content, managing sessions, and performing publishing and engagement operations. However, the supplied code chunk is only a test file for checking software release version consistency. It reads version metadata from pyproject.toml and validates release/runtime version matches. There is no evidence of Xiaohongshu access, browser automation, content operations, or confirmation logic for write actions. This is a clear material mismatch in primary purpose and implemented capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full Xiaohongshu automation agent with content retrieval and write operations. The supplied code does not implement any of those behaviors; it is only a test module for session storage helpers. While session management is loosely related to the declared skill, this chunk specifically verifies JSON metadata persistence, environment seed overrides, corrupt-file recovery, and atomic file-write semantics. There are no platform interactions, no Playwright usage, no JSON response formatting logic, and no user-confirmation enforcement for write actions. This is therefore a material description-behavior mismatch for the supplied code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a Xiaohongshu automation agent with Playwright-based social platform interactions such as searching, reading, posting, commenting, liking, and session management. The supplied code does none of that. Instead, it is a set of unit tests for static site compliance and discoverability checks for a GitHub Pages site. There is no Playwright automation, no Xiaohongshu API or browser interaction, no login/session handling, and no content publishing or engagement actions. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a full-featured Xiaohongshu automation agent skill with social platform read/write operations and confirmation requirements. The supplied code chunk instead contains unit tests for validating skill markdown/frontmatter and CLI behavior. It does not implement or exercise any Xiaohongshu-specific functionality, browser automation, content operations, or user-confirmation flow. This is a clear material mismatch in primary purpose and capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a platform automation agent for Xiaohongshu with browser-driven actions and guarded write operations. The supplied code does not implement or test any such platform behavior. Instead, it is solely a test suite for a local 'strategy' module that manages persona/config initialization, daily usage counters, and scheduled post metadata. This is a materially different primary purpose from the declared social-platform automation capability, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a full Xiaohongshu automation skill with platform interaction capabilities and safeguards around write actions. However, the provided code chunk contains only tests for a template engine that generates titles, content structures, tags, and validation results. There is no evidence of browser automation, network/platform access, account/session handling, or any Xiaohongshu-specific operational behavior. This is a material mismatch in primary purpose and capabilities, not merely a partial implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description is for a Xiaohongshu automation agent with significant platform interaction capabilities. The supplied code chunk does not implement any of those features. Instead, it is a standalone test verifying that unit tests do not incur real sleep delays. This is a materially different primary purpose and unrelated behavior, so the description does not accurately represent the code shown.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents a broad Xiaohongshu agent with search, reading, login/session management, publishing, and engagement actions. The supplied code chunk, however, is narrowly focused on unit tests for retrieving the current user's profile from a page element and extracting a user ID from a URL. That is related to Xiaohongshu account/profile handling, but it does not substantiate most of the declared capabilities, and its primary purpose here is testing profile lookup behavior. Because the chunk's concrete behavior is materially narrower and different from the declared skill description, this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
85% confidence
Finding

pip install git+https://github.com/DeliciousBuding/xiaohongshu-skill.git installs and executes packaging/build code directly from a live remote repository without pinning to an immutable version or commit. If the upstream repository, dependency chain, or maintainer account is compromised, users could fetch and run attacker-controlled code during installation, which is especially sensitive here because the skill handles browser automation and account sessions.

Content

Scanner excerpt · docs/INSTALL.md (reported line 40)May include surrounding context.

ill.git cd xiaohongshu-skill uv sync --frozen --no-dev uv run playwright install chromium

text

On Linux, install browser system dependencies with:

```bash
uv run playwright install --with-deps chromium

Login and verify:

bash
uv run python -m scripts qrcode --headless=false
uv run python -m scripts check-login
uv run python -m scripts search "咖啡" --limit=3

Global CLI

bash
pip install git+https://github.com/DeliciousBuding/xiaohongshu-skill.git
playwright install chromium
xiaohongshu-skill qrcode --headless=false
xiaohongshu-skill search "咖啡" --limit=3

The cloned uv.lock path is recommended for development and reproducible local runs. The global Git installation is a convenience path.

Agent Skill

Recommended cross-platform installation:

bash
npx skills add DeliciousBuding/xiaohongshu-skill

ClawHub:

bash
clawhub install xiaohongshu-skill

Manual folders:

text
Claude Code: ~/.claude/skills/xiaohongshu-skill
Codex/Cursor shared

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · scripts/quality.py (reported line 74)May include surrounding context.

python
def run_task(task: str, *, port: int = 8000) -> int:
    env = None
    if task == "live":
        env = os.environ.copy()
        env["XHS_LIVE_TEST"] = "1"
    return _run_many(command_plan(task, port=port), env=env)

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · site/index.html (reported line 383)May include surrounding context.

html
utton secondary" href="demo.html">Demo Outputs</a>
          </div>
        </div>
        <div class="showcase" aria-label="Project preview">
          <div class="terminal" aria-label="CLI example">
            <div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span></div>
            <pre><code>npx skills add DeliciousBuding/xiaohongshu-skill
pip install git+https://github.com/DeliciousBuding/xiaohongshu-skill.git
playwright install chromium
xiaohongshu-skill qrcode --headless=false
xiaohongshu-skill --profile brand-a search "上海咖啡" --limit=3
xiaohongshu-skill selectors --owner=publish
xiaohongshu-skill contracts --command=search</code></pre>
          </div>
          <figure class="visual">
            <img src="og-image.svg" alt="xiaohongshu-skill terminal preview with Xiaohongshu and RedNote labels">
          </figure>
        </div>
        <div class="facts" aria-label="Project facts">
          <div class

Static analysis

No suspicious patterns detected.