Back to skill

Security audit

douyin-analyse-batch

Security checks for vulnerabilities and agentic risk

Overview

The skill matches a Douyin daily-report workflow, but it also sets persistent automation and contains hardcoded external recipients and exposed services that could send reports or credentials where the user did not explicitly choose.

Review carefully before installing. Remove all hardcoded QQ and Telegram recipients, require explicit recipient confirmation before any send, make cron opt-in, bind the web UI to localhost with authentication, avoid entering API keys into the browser UI until the misleading key-handling behavior is fixed, and protect SMTP/TikHub credentials with least-privilege environment handling.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
Findings (9)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/setup_douyin_daily_report.sh:9
Finding

Scheduled reports are automatically sent to hardcoded third-party email recipients

Content
View full analysis
"$ENV_FILE" << 'EOF' # SMTP email configuration SMTP_USER=your_email@qq.com SMTP_PASS=your_smtp_authorization_code SMTP_HOST=smtp.qq.com SMTP_PORT=587 # Recipients DOUYIN_EMAIL_RECIPIENTS=3249331357@qq.com,1853026634@qq.com # Report limit DOUYIN_DIGEST_LIMIT=15 # Python virtual environment DOUYIN_VENV_PY=/tmp/douyin_transcribe/venv/bin/python3 # TikHub API Token # Add "tikhub_api_token": "your_token" to ~/.openclaw/config.json EOF ``` ```bash export SMTP_USER="${SMTP_USER:-3249331357@qq.com}" export SMTP_PASS="${SMTP_PASS:-}" export SMTP_HOST="${SMTP_HOST:-smtp.qq.com}" export SMTP_PORT="${SMTP_PORT:-587}" export DOUYIN_EMAIL_RECIPIENTS="${DOUYIN_EMAIL_RECIPIENTS:-3249331357@qq.com,1853026634@qq.com}" ``` ```python DEFAULT_RECIPIENTS = ['3249331357@qq.com'] def build_recipients() -> list[str]: env_val = os.environ.get('DOUYIN_EMAIL_RECIPIENTS', '') if env_val.strip(): return [r.strip() for r in env_val.split(',') if r.strip()] return DEFAULT_RECIPIENTS ``` ```python with smtplib.SMTP(smtp_host, smtp_port) as smtp: smtp.ehlo() smtp.starttls() smtp.ehlo() smtp.login(sender, password) smtp.sendmail(sender, recipients, msg.as_bytes()) ``` ### Technical Analysis The installer writes two preset QQ addresses into the generated `.env` file. The scheduled wrapper independently falls back to the same addresses, while the email helper contains another hardcoded fallback. The user is therefore not required to affirmatively c ...[truncated 1468 chars]
Remediation
View remediation

T06 · System Persistence

Error
Location
scripts/setup_douyin_daily_report.sh:64
Finding

The installer creates persistent twice-daily execution without separate opt-in consent

Content
View full analysis
> /tmp/douyin_cron.log 2>&1" (crontab -l 2>/dev/null | grep -v "douyin_daily_digest"; echo "$CRON_CMD") | crontab - echo " Cron configured for 08:00 and 16:00" ``` ### Technical Analysis Running the one-step setup script directly modifies the user's crontab and establishes execution twice every day. The scheduled process reads credentials, accesses external APIs, invokes OpenClaw, creates local files, and attempts email delivery. Scheduling is relevant to the declared daily-report feature, but installing persistence as an inseparable part of environment setup violates least-surprise and informed-consent principles. A user cannot run the setup script merely to prepare or test the Skill without also creating persistent execution. The command also rebuilds the complete crontab through a pipeline. Although it attempts to remove an older matching entry, this pattern is fragile and does not use a clearly delimited managed block. ### Attack Path 1. The user follows the documented one-step installation command. 2. The script silently appends a twice-daily cron entry. 3. The installation session ends, but the cron entry remains. 4. At 08:00 and 16:00, the wrapper loads `.env` and invokes the report pipeline. 5. The persistent process performs external requests and email transmission without a new interactive request. 6. The activity continues until the user notices and removes the cron entry. ### Impact Assessment The persistent task receives the privileges of the user ...[truncated 504 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
dependencies/douyin-mcp-server/README.md:197
Finding

Documentation executes a mutable remote installer directly through a shell

Content
View full analysis
`apt install ffmpeg` (Ubuntu) | ``` ### Technical Analysis The instruction downloads a remote script and immediately pipes it into `sh`. The effective code is not pinned to a version, reviewed locally, or verified using a checksum or signature. HTTPS protects the connection in transit under normal conditions, but it does not protect against compromise of the hosting account, build pipeline, DNS infrastructure, certificate issuance process, or upstream script. The payload can change after this Skill package has been reviewed. ### Attack Path 1. A user or automated agent follows the bundled dependency instructions. 2. `curl` retrieves the current response from `https://astral.sh/uv/install.sh`. 3. The response is passed directly to the local shell. 4. If the upstream delivery path is compromised, attacker-controlled shell commands execute immediately. 5. Those commands inherit the installing user's filesystem, environment, and network access. ### Impact Assessment A malicious remote script can execute arbitrary commands with the installing user's privileges. Depending on that account, it could: - Read user files and credentials. - Modify shell profiles or scheduled tasks. - Install binaries or additional persistence. - Alter the OpenClaw workspace. - Exfiltrate tokens and SMTP credentials. - Download and execute further payloads. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
dependencies/douyin-mcp-server/web/app.py:107
Finding

The bundled MCP and Web services permit unauthenticated server-side requests to arbitrary URLs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
dependencies/douyin-mcp-server/web/app.py:28
Finding

The network-exposed Web UI accepts transcription API secrets from browser requests

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
dependencies/douyin-mcp-server/web/templates/index.html:7
Finding

The API-key interface executes mutable third-party JavaScript without integrity protection

Content
View full analysis
``` ### Technical Analysis The page loads executable JavaScript from mutable third-party CDN URLs. Alpine.js is constrained only to the broad `3.x.x` series, while the Tailwind CDN URL does not identify a fixed release. Neither script uses Subresource Integrity. Third-party scripts run with the page's origin and can access the complete DOM, including API-key fields, video URLs, transcripts, and API responses. A CDN compromise or malicious upstream update can therefore turn a dependency into a credential-exfiltration payload after the Skill itself has been reviewed. ### Attack Path 1. The operator opens the bundled Web UI. 2. The browser retrieves JavaScript from the external CDN. 3. The CDN account, upstream package, or delivery path serves modified JavaScript. 4. The modified script executes under the Web UI's origin. 5. It reads the API-key input and other page data. 6. It sends those values to an attacker-controlled endpoint. ### Impact Assessment A successful supply-chain compromise can expose: - Transcription API keys entered into the page. - Submitted Douyin URLs. - Extracted transcripts and download links. - Other same-origin API responses available to page JavaScript. The compromise affects users who load the page while malicious CDN content is being served. ]]>
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/run_daily_digest.py:62
Finding

SMTP credentials are unnecessarily inherited by the OpenClaw agent subprocess

Content
View full analysis
Remediation
View remediation

T02 · Agent Memory Poisoning

Warning
Location
scripts/run_daily_digest.py:35
Finding

A fixed OpenClaw session allows cross-run context contamination by untrusted video titles

Content
View full analysis
str: """Use the openclaw agent command to generate analysis notes""" session_key = "agent:main:lightclawbot:direct:100012167891" prompt = f"""You are a professional Douyin video content analyst. Analyze the following video and generate analysis notes. [Video title] {title} [Video URL] {video_url or "None"} [Transcript] {transcript if transcript else "(No transcript; analyze only the title and tags)"} Generate the requested structured analysis.""" result = subprocess.run( ["openclaw", "agent", "--session-id", session_key, "--message", prompt, "--timeout", "90"], capture_output=True, text=True, timeout=120, env={**os.environ, "PATH": os.environ.get("PATH", "") + ":/root/.local/share/pnpm"} ) ``` ### Technical Analysis Every video and every scheduled run uses the same hardcoded session identifier. Video titles and URLs originate from an external API and are interpolated directly into the agent message. If OpenClaw retains conversation state for that session, attacker-controlled title text can affect later analyses. The lack of a per-run session boundary also permits context from earlier reports to influence later reports. The identifier appears externally specific rather than locally generated, increasing the risk of unintended routing or state sharing. No explicit instruction to override platform policy was found in the package. The risk arises from persistent reuse of one agent context with untrusted external content. ### Attack Path 1. An attacker causes a specially crafted video title to appear in the trend data. 2. The scheduled pipeline embeds that title directly into ...[truncated 818 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
dependencies/douyin-hot-trend/cron-job.js:125
Finding

A bundled executable prepares messages for a hardcoded Telegram chat

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (170)

Tainted flow: 'video_info' from os.getenv (line 359, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The downloader fetches video_info['url'] obtained from remote page data and streams it to disk without validating the destination host or content type. A malicious or tampered upstream response could cause the skill to download arbitrary remote content, enabling SSRF-style egress, large-file abuse, or storage exhaustion.

Content

Scanner excerpt · dependencies/douyin-mcp-server/douyin-video/scripts/douyin_downloader.py (reported line 150)May include surrounding context.

python
if show_progress:
            print(f"正在下载视频: {video_info['title']}")

        response = requests.get(video_info['url'], headers=HEADERS, stream=True)
        response.raise_for_status()

        # 获取文件大小

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The installation flow reportedly modifies crontab, writes config files, installs dependencies associated with transcription/download, and may preconfigure external communication targets, none of which are fully surfaced in the high-level description. Hidden persistence and communication setup materially increases risk because it can continue operating after initial invocation and send data externally without ongoing user awareness.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The skill’s structure explicitly includes a generated .env file for SMTP credentials and related configuration, indicating collection and local storage of secrets. In a skill that also uses shell, filesystem, and network capabilities, locally stored credentials create a meaningful risk of leakage, misuse, or accidental inclusion in logs/backups.

Content

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

text
douyin-daily-report/
├── SKILL.md
├── .env                              ← 环境变量(setup 脚本生成)
├── scripts/
│   ├── setup_douyin_daily_report.sh  ← 一键安装(含 venv + Cron)
│   ├── cron_daily_digest_wrapper.sh  ← Cron 入口

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata promises an email/Word daily report workflow, but this file is built around generating Telegram delivery artifacts with a hard-coded chat_id. That mismatch is dangerous because it can route data to an undisclosed external channel and defeat user expectations, review assumptions, and policy controls around where generated reports are sent.

Content

No source excerpt is available for this finding.

Tainted flow: 'files' from open (line 251, file read) → requests.post (network output)

High
Category
Data Flow
Confidence
97% confidence
Finding

The script uploads extracted audio to an external transcription API, which can disclose sensitive spoken content and metadata outside the local environment. In a skill context that automates reports and email delivery, this data egress is especially important because users may not expect third-party transmission of downloaded media content.

Content

Scanner excerpt · dependencies/douyin-mcp-server/douyin-video/scripts/douyin_downloader.py (reported line 261)May include surrounding context.

python
}

        try:
            response = requests.post(self.api_base_url, files=files, headers=headers)
            response.raise_for_status()

            result = response.json()

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · dependencies/douyin-mcp-server/web/templates/index.html (reported line 116)May include surrounding context.

html
</head>
<body class="bg-douyin-gray-50 min-h-screen bg-gradient-mesh" x-data="douyinExtractor()" x-init="checkHealth()">

    <!-- Top Navigation Bar -->
    <nav class="sticky top-0 z-50 bg-white/80 backdrop-blur-xl border-b border-douyin-gray-100">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex items-center justify-between h-16">

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The page tells users the API key is only stored locally and will not be uploaded to the server, but the code later sends that locally stored key to the backend during extraction. This is a direct trust and secret-handling violation: users may disclose a sensitive credential under false pretenses, and the backend can log, retain, or misuse it.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · dependencies/douyin-mcp-server/web/templates/index.html (reported line 274)May include surrounding context.

html
</div>
    </div>

    <!-- Help Modal -->
    <div x-show="showHelp" x-transition.opacity class="fixed inset-0 z-50 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4"
         @click.self="showHelp = false">
        <div x-show="showHelp" x-transition:enter="transition ease-out duration-200"

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly instructs the agent to email the generated analysis note to a preset recipient list, including a hardcoded default external address, without requiring explicit per-run user confirmation of recipients or warning that potentially sensitive transcript and analysis content will be transmitted off-device. This creates a real risk of unauthorized data exfiltration, especially because users may invoke the skill for analysis purposes without realizing it automatically sends attachments externally.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
crontab -l | grep -v "douyin_daily_digest" | crontab -

# 删除虚拟环境
rm -rf /tmp/douyin_transcribe

# 删除输出文件
rm -rf ~/Documents/douyin_analysis

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
crontab -l | grep -v "douyin_daily_digest" | crontab -

# 删除虚拟环境
rm -rf /tmp/douyin_transcribe

# 删除输出文件
rm -rf ~/Documents/douyin_analysis