Back to skill

Security audit

抖音爆款爬虫 v2

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but its setup asks users to run broad, mutable package and browser installation steps that are more powerful than the implemented scraper needs.

Install only if you are comfortable with the setup downloading code and browser binaries from package registries, Playwright distribution hosts, mirror hosts, and Docker registries. Prefer running the API-only scripts without the Playwright/Docker install steps unless you specifically need them, and review/pin dependencies before using this in a sensitive environment.

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
requirements.txt:1
Finding

Unpinned and Unverified Third-Party Dependencies and Browser Binaries

Content
View full analysis
=1.40.0 ``` `install.sh:43-55` ```bash source venv/bin/activate pip install --upgrade pip pip install playwright # 安装浏览器 echo "" echo "🌐 正在安装 Playwright 浏览器..." playwright install chromium # 安装 Node.js 依赖(如果有 Node.js) if command -v npm &> /dev/null; then echo "" echo "📦 正在安装 Node.js 依赖..." npm install fi ``` `install_playwright_docker.py:7-8` ```python PLAYWRIGHT_VERSION = os.environ.get("PW_VERSION", "1.50.0") IMAGE_TAG = f"mcr.microsoft.com/playwright/python:v{PLAYWRIGHT_VERSION}-noble" ``` `install_playwright_docker.py:17-25` ```python def mode_official() -> None: run(["docker", "pull", IMAGE_TAG]) dockerfile = f"""FROM {IMAGE_TAG} WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt CMD [\"python\", \"--version\"] """.strip() ``` `install_playwright_docker.py:30-34` ```python env = os.environ.copy() env.setdefault("PLAYWRIGHT_DOWNLOAD_HOST", "https://npmmirror.com/mirrors/playwright") env.setdefault("PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST", "https://cdn.npmmirror.com/binaries/chrome-for-testing") venv_python = Path("venv/bin/python") venv_pip = Path("venv/bin/pip") ``` The corresponding installation calls are: ```python run([str(venv_pip), "install", "-r", "requirements.txt"], env=env) run([str(venv_python), "-m", "playwright", "install", "chromium"], env=env) ``` `SKILL.md:36-41` ```bash cd npm install ``` ```bash npx playwright install chromium ``` ### Technical Analysis The Python dependency permits any Playwright r ...[truncated 3487 chars]
Remediation
View remediation
``` 2. Generate a fully resolved lock file containing cryptographic hashes for Playwright and all transitive Python dependencies. Install with hash enforcement, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Remove the implicit `pip install --upgrade pip` operation from normal installation. If a specific pip release is required, pin and verify it explicitly. 4. Keep the Playwright package version and browser revision synchronized. Verify downloaded browser archives using vendor-published checksums or signatures before execution. 5. Prefer official Playwright distribution endpoints. If third-party mirrors are operationally required: - Document them as an explicit trust dependency. - Pin expected artifact hashes. - Require an explicit user option instead of enabling them by default. - Use strict TLS validation and monitor mirror integrity. 6. Pin the Playwright Docker image by immutable digest: ```dockerfile FROM mcr.microsoft.com/playwright/python:v-noble@sha256: ``` 7. Remove `npm install` and `npx playwright install chromium` from the instructions unless Node dependencies are genuinely required. If they are required, add a reviewed `package.json` and lock file, use exact package versions, and install with: ```bash npm ci ``` 8. Avoid dynamic `npx` package retrieval. Invoke a project-local, lock-file-managed executable instead. 9. Run installation as an unprivileged user and avoid granting the installer unnecessary host mounts, credentials, or privileged Docker access. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill claims keyword search and 'no login required,' but the document later explains that full search is unavailable without login and that current behavior is only hot-list matching plus suggestions. This mismatch can mislead users or orchestrators into sending broader requests than intended, while also hiding undeclared local file output capability via --output.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill claims keyword search and 'no login required,' but the document later explains that full search is unavailable without login and that current behavior is only hot-list matching plus suggestions. This mismatch can mislead users or orchestrators into sending broader requests than intended, while also hiding undeclared local file output capability via --output.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/douyin_scraper.js search "海鲜" 20

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/douyin_scraper.js search "海鲜" 20

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/douyin_scraper.js search "海鲜" 20

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/douyin_scraper.js search "海鲜" 20

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 · install_playwright_docker.py (reported line 30)May include surrounding context.

python
def mode_native() -> None:
    env = os.environ.copy()
    env.setdefault("PLAYWRIGHT_DOWNLOAD_HOST", "https://npmmirror.com/mirrors/playwright")
    env.setdefault("PLAYWRIGHT_CHROMIUM_DOWNLOAD_HOST", "https://cdn.npmmirror.com/binaries/chrome-for-testing")
    venv_python = Path("venv/bin/python")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documentation instructs users to run shell commands, install dependencies, access the network, and optionally write output files, but it does not declare any tool scope or permissions. In an agent setting, undeclared capabilities reduce transparency and can lead to over-privileged execution or unsafe invocation of shell/network actions without explicit user awareness.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

Using npx playwright install chromium without pinning a specific package version introduces supply-chain risk because the resolved package may change over time or be influenced by the environment. This can result in unexpected code execution during install, especially in automated or agent-driven environments that treat install commands as trusted setup steps.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language trigger guidance is broad and overlaps with common conversational phrases, increasing the chance that an agent auto-invokes scraping actions when the user only intended discussion or analysis. In agent environments with shell/network access, overly permissive trigger patterns can cause unintended external requests or data collection.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This plain text file contains generic example utterances such as '搜索一下海鲜视频' and '看看抖音热榜有什么' without any explicit activation criteria, boundaries, or negative examples. Several phrases are broad everyday requests, which could cause unintended invocation if used as trigger examples for a skill.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · install_playwright_docker.py (reported line 14)May include surrounding context.

python
def run(cmd: list[str], cwd: str | None = None, env: dict[str, str] | None = None) -> None:
    print("\n>>>", " ".join(cmd))
    subprocess.run(cmd, cwd=cwd, env=env, check=True)


def mode_official() -> None:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The top-level documentation says the skill supports '浏览器搜索 (需登录) - 完整搜索功能' and the CLI usage says search can search videos automatically. In reality, the search implementation only combines getHotSearch and getSuggestions and never performs browser automation, authenticated access, or video-result retrieval.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file header and help text describe search as '搜索视频' and '自动选择最佳方式', implying multiple search modes including full browser search. However, the actual search method at L116-L143 only correlates a keyword against hot topics and search suggestions, without fetching video search results at all.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTTP request headers hard-code Accept-Language: zh-CN,zh;q=0.9,en;q=0.8, which imposes a locale preference in all requests. This is a natural-language/locale policy concern because the user is not offered any language or locale choice, and the file does not document a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The entire skill documentation, including the title, commands, and operational notes, is presented only in Chinese. This creates a language/locale constraint without any stated opt-in, alternative language option, or justification that the skill is intended only for a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

文档整体仅以中文描述名称、功能、使用方法和自然语言示例,未说明是否支持其他语言,也未给出用户语言选择或中文限定的业务理由。按自然语言策略要求,若技能实际上要求特定语言交互,应提供用户可选项或明确、合理的限制说明。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

All natural-language content in the file is written in Chinese, and there is no indication that language selection is optional or that the skill is intentionally limited to Chinese-speaking users. This can violate language or locale policy if the skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script presents its user-facing comments and echoed guidance entirely in Chinese, including installation status and usage examples. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency is specified with a lower-bound only (playwright>=1.40.0), which allows installation of any newer major or minor release. This can introduce supply-chain risk through unexpected breaking changes or newly introduced vulnerable versions, and it also harms build reproducibility. In this scraper context, Playwright is a powerful browser automation package, so uncontrolled upgrades can affect both security posture and runtime behavior.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
playwright>=1.40.0

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The manifest describes a data-scraping utility for Douyin hot rankings and search suggestions, which implies network retrieval and result presentation. In addition to that, the CLI supports saving results to user-specified paths via --output, introducing local file write behavior that is not mentioned in the stated scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.