Back to skill

Security audit

抖音数据分析 SocialDataX 作品搜索

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed read-only Douyin search helper, but it tells agents to automatically run a mutable npm package with the user's API key, which needs review before use.

Install only if you are comfortable giving the SocialDataX CLI access to SOCIALDATAX_API_KEY in the agent environment. Prefer a pinned reviewed package version, run it in a restricted environment with only that API key exposed, and avoid automatic dependency restoration unless you approve the exact package/version being installed.

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

Warning
Location
SKILL.md:27
Finding
Unpinned Third-Party npm Package Is Downloaded and Executed Automatically<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:7`, `SKILL.md:27-40`, and `SKILL.md:113` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code Dependency installation declaration at line 7: ```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"}} ``` Direct CLI instructions at lines 27-40: ```markdown Prefer the direct CLI when the agent can run shell commands. It does not require MCP server configuration: ```bash npx -y socialdatax-skills@latest douyin hot-search \ --pretty --source-client socialdatax-skills --source-platform clawhub \ --source-skill socialdatax-douyin-search npx -y socialdatax-skills@latest douyin search \ --keyword "<keyword>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-douyin-search npx -y socialdatax-skills@latest douyin search \ --keyword "<keyword>" --pages 3 --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-douyin-search ``` ``` Automatic installation guidance at line 113: ```markdown If the current environment has permission, install or restore automatically. ``` ### Technical Analysis The Skill directs the Agent to invoke `npx -y socialdatax-skills@latest`. This command retrieves and executes the package version currently identified by the mutable `latest` npm tag. The package is not pinned to a reviewed version, and the instructions do not require integrity verification, signature validation, or source review. The `-y` option automatically accepts installation prompts, reducing the opportunity for the user or operator to review what will be installed. npm package code and lifecycle scripts execute with the permissions available to the Agent pr ...[truncated 2931 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin an exact reviewed version** - Replace `socialdatax-skills@latest` with a specific immutable version, such as `socialdatax-skills@X.Y.Z`. - Update the version only after reviewing and testing the new release. 2. **Verify dependency integrity** - Use a lockfile and verify the package's registry integrity hash. - Where supported, verify package provenance or signatures. - Document the expected package publisher, source repository, and checksum. 3. **Avoid automatic approval** - Remove `-y` from `npx` commands. - Do not instruct the Agent to install or restore dependencies automatically without explicit authorization. 4. **Apply process-level least privilege** - Run the CLI in an isolated container or sandbox. - Supply only `SOCIALDATAX_API_KEY` rather than the Agent's complete inherited environment. - Deny access to browser profiles, SSH configuration, cloud credentials, and unrelated project files. - Use a dedicated low-privilege operating-system account and a read-only filesystem where practical. 5. **Restrict network access** - Allow outbound connections only to documented SocialDataX API endpoints and required npm infrastructure during a separately controlled installation phase. - Separate dependency installation from authenticated API execution so package installation scripts cannot access the API key. 6. **Improve auditability** - Include or link to the exact reviewed source corresponding to the pinned package release. - Document all expected external endpoints, lifecycle scripts, and credential-handling behavior. - Prefer a preinstalled, verified binary or package artifact over runtime retrieval. 7. **Protect credentials** - Use a narrowly scoped API key with usage limits where the service supports it. - Rotate the key if execution of an untrusted or compromised package is suspected. - Avoid exposing unrelated secrets to the CLI process. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill instructs agents to execute `npx -y socialdatax-skills@latest ...`, which pulls and runs whatever package version is current at execution time. This creates a supply-chain risk: a compromised publisher account, malicious update, or breaking release could cause arbitrary code execution in the agent environment with access to the user's API key and local runtime permissions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
This command also uses `npx -y socialdatax-skills@latest`, so the executed code is not fixed to a reviewed artifact. In an agent skill context, that means a future package change can silently alter behavior or execute malicious code while handling user queries and secrets.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The third example repeats the same unpinned `npx` execution pattern, so it carries the same remote code execution and supply-chain exposure. Because the skill is designed for direct CLI use, these examples are likely to be followed by agents verbatim, increasing practical exploitability.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- `--max-items <n>`: stop after collecting N search results.
- `--source-client socialdatax-skills --source-platform clawhub --source-skill socialdatax-douyin-search`: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.

Use `douyin hot-search` for the current Douyin main hot-search list. Do not ask the user for `--keyword` for this command.
Douyin sort values:
- `general`: default sorting.
- `time_descending`: newest first.
Confidence
80% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The manifest and top-level description present the skill as covering hot search, works/video-image search, keyword research, competitor analysis, and trend analysis, but do not mention creator/account discovery. Later in the file, the skill declares and recommends an additional MCP-only tool, `douyin_search_users`, for discovering Douyin creators or accounts, which expands the functional scope beyond the stated manifest behavior.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.