Back to skill

Security audit

小红书评论分析与需求挖掘

Security checks for vulnerabilities and agentic risk

Overview

The skill is read-only and purpose-aligned, but it runs an unpinned npm package at runtime with access to the user's API key, so it should be reviewed before installation.

Install only if you are comfortable running the current npm release of socialdatax-skills with your SOCIALDATAX_API_KEY. Prefer a pinned reviewed version, minimal environment variables, and a sandboxed or containerized run before using it on sensitive projects.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:8
Finding
Execution of an Unpinned and Remotely Mutable npm Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 8 and lines 35-47 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: High ### Vulnerable Code ```yaml metadata: {"openclaw":{"requires":{"env":["SOCIALDATAX_API_KEY"],"bins":["node","npm"]},"primaryEnv":"SOCIALDATAX_API_KEY","install":[{"kind":"node","package":"socialdatax-skills","bins":[]}],"emoji":"💬","homepage":"https://socialdatax.com/ai?from=clawhub"}} ``` ```bash npx -y socialdatax-skills@latest xhs comments \ --note-id "<note_id>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill xhs-comment-insights npx -y socialdatax-skills@latest xhs comments \ --url "<note_url_or_share_text>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill xhs-comment-insights npx -y socialdatax-skills@latest xhs sub-comments \ --note-id "<note_id>" --comment-id "<comment_id>" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill xhs-comment-insights ``` ### Technical Analysis The Skill directs the Agent to download and execute `socialdatax-skills@latest` from npm. The `latest` tag is mutable and does not identify a specific, previously audited package version. The `-y` option automatically accepts installation without an interactive confirmation step. The project contains neither the package's executable source nor a dependency lockfile or integrity hash. Consequently, the code executed at runtime can differ from the code that existed when the Skill was reviewed. npm package installation may also execute lifecycle scripts before the requested CLI command runs. This is a supply-chain vulnerability rather than evidence that the current package release is malicious. Exploitation requires compromise of the package publisher, npm distribution path, or a future malicious release. ### Attack Path 1. An attacker compromises the npm publisher account, pac ...[truncated 1559 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `socialdatax-skills@latest` with an exact, reviewed version, such as `socialdatax-skills@1.2.3`. Do not use mutable npm tags or version ranges for executable tooling. 2. Commit an npm lockfile and require lockfile-based installation, such as `npm ci`, to preserve the audited dependency graph. 3. Verify package integrity using trusted registry integrity metadata, checksums, signatures, or package provenance before execution. 4. Remove `-y` where practical so unexpected package installation is not silently accepted. 5. Review the pinned package, its transitive dependencies, and npm lifecycle scripts before deployment. 6. Disable npm lifecycle scripts during installation where they are unnecessary, for example by using `--ignore-scripts`, after confirming that the package operates correctly under that restriction. 7. Execute the CLI in a sandbox or container with a minimal environment, read-only filesystem access where possible, and restricted outbound networking. 8. Pass only the required API credential to the child process rather than exposing all Agent environment variables. 9. Establish a controlled update process in which new versions are reviewed, integrity-verified, tested, and explicitly pinned before use. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (3)

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The skill invokes `npx -y socialdatax-skills@latest`, which fetches and executes the newest package version at runtime instead of a fixed, reviewed release. If the npm package is compromised, a malicious maintainer publishes a bad update, or a dependency is hijacked, an agent following this skill could immediately execute attacker-controlled code in the local environment with access to available credentials and files.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
This command also uses `npx -y socialdatax-skills@latest`, creating a supply-chain risk because execution depends on whatever code is published to npm at the moment the skill runs. In an agent context, this is especially risky because the fetched code may run non-interactively and can inherit environment variables such as `SOCIALDATAX_API_KEY` and other host capabilities.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding
The third example repeats the same unsafe pattern: `npx` downloads and executes the latest remote package version on demand. Because the skill is presented as operational guidance, users or agents may treat it as trusted and execute it directly, turning an npm account compromise or malicious update into arbitrary code execution.

Static analysis

No suspicious patterns detected.