Back to skill

Security audit

抖音评论管理助手

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its Douyin comment-management purpose, but it can post bulk replies from a live creator account with weak confirmation and unsafe targeting safeguards.

Install only if you are comfortable with a skill reusing a persistent Douyin login and posting replies from that account. Use dry-run first, keep the .playwright profile private and out of backups or source control, avoid running this in a sensitive workspace, and do not use live batch reply until targeting, confirmation, HTML escaping, and session-storage protections are fixed.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/report.py:408
Finding

Stored HTML Injection in Generated Comment Reports

Content
View full analysis
{i+1}{a["name"]}{a["count"]} 条评论' for i, a in enumerate(top_authors))} ... {"".join(f'
{c.get("author_name", "?")[0] if c.get("author_name") else "?"}
{c.get("author_name", "匿名用户")}
{c.get("content", "")[:200]}
👍 {c.get("like_count", 0)} · {c.get("create_time", "")[:10]}
' for c in comments[:50])} ``` ### Technical Analysis The report generator interpolates author names and comment content directly into an HTML document without HTML escaping or contextual output encoding. These values originate from externally controlled Douyin comments and account profile names. Truncating comment content to 200 characters does not prevent injection because a functional HTML or event-handler payload can fit within that limit. For example, a crafted author name or comment containing an image element with an error event handler would be interpreted as markup rather than displayed as text. The generated report also has no restrictive Content Security Policy to mitigate inline event handlers or injected scripts. ### Attack Path 1. An attacker posts a crafted comment or uses a crafted account display name on a video managed by the victim. 2. `scripts/fetch_comments.py` collects the attacker-controlled value and writes it to the comment JSON data. 3. The user runs `scripts/report.py` with that JSON file. 4. `generate_html_report()` inserts the malicious value directly into `report.html`. 5. The user opens the generated report in a browser. 6. The browser parses the attacker-controlle ...[truncated 705 chars]
Remediation
View remediation
``` - Treat all imported JSON data as untrusted, even when it was produced by another script in the project. - Add regression tests containing HTML elements, quotes, event handlers, and closing tags, then verify that the resulting report displays them only as text. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_reply.py:157
Finding

Batch Replies Are Not Bound to Their Intended Comments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:82
Finding

Authentication Cookies Are Stored as Plaintext in the Project Directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/auth.py:61
Finding

Chromium Security Sandbox Is Explicitly Disabled

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a full comment management and automation assistant for Douyin Creator Center, centered on grabbing comments and bulk replying. However, the code chunk does not perform any comment retrieval, comment interaction, reply automation, template matching, or reporting. Its sole function is authentication: checking whether a saved login state exists, launching a Playwright browser, allowing the user to scan a QR code, detecting successful login, and persisting session state to disk. While login can be a supporting component for the broader declared system, this specific code chunk's actual behavior is materially narrower than the declared purpose, and the listed triggers related to comment management are not represented in the code shown.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

声明描述的是一个较完整的评论管理助手,核心能力包括评论抓取、批量回复、智能模板匹配和交互式可视化报告。实际代码片段只覆盖其中的“批量回复”部分,且输入依赖外部提供的未回复评论 JSON 文件,没有实现抓取评论的逻辑;报告部分也仅为终端日志与 JSON 导出,不属于交互式可视化报告。此外,AI 回复能力只是占位实现,虽然注释说明为预留接口,但与“支持智能模板匹配和交互式可视化报告”的完整产品描述相比仍存在功能落差。代码的主要目的仍与抖音评论管理相关,但声明对能力范围有明显夸大,因此应判定为描述与实际行为存在不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

代码与描述在核心能力上存在明显不一致。现有脚本的主要目的是真实抓取抖音创作者中心的作品与未回复评论,属于评论采集模块;这与描述中的“抓取评论”部分一致。但描述强调的关键能力——批量回复、智能模板匹配、交互式可视化报告——在提供的代码中均未实现。代码没有填写回复内容、点击发送、批量处理回复,也没有任何模板库、关键词匹配、规则引擎、LLM 调用或报告界面生成逻辑。虽然这可能只是整个技能中的一个子模块,但就该代码块本身而言,描述对其能力有明显夸大,因此应判定为不准确匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documents local file read/write behavior and persistent session storage but does not declare any explicit tool scope or permissions boundaries. In an agent ecosystem, missing scope declarations can cause over-broad tool access, make review harder, and increase the chance that the skill is invoked with more filesystem capability than users expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad and can activate a high-impact automation skill in loosely related contexts, increasing the chance of unintended scraping, session use, or bulk-reply actions. Because the skill operates on a live creator account and persisted browser session, accidental invocation is more dangerous than for a read-only helper.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly stores commenter data and a persistent Playwright login profile locally, but does not present a clear user warning about the collection, retention, and sensitivity of that data. This creates privacy and account-security risk: leaked session data could enable account access, and stored commenter records may contain personal information subject to policy or regulatory requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill reference is written in Chinese and does not indicate that language selection is optional or that the content is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

All configured keywords and replies are in Chinese, indicating the skill is designed to respond in a single language without any visible user opt-in or documented locale limitation. Under the policy, forcing a specific language without choice or justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The final template matches any comment containing a question mark, which is extremely broad and can override more specific intent detection for many unrelated comments. In a bulk auto-reply workflow, this can cause inappropriate or misleading responses at scale, creating reputational harm and increasing the chance of spam-like behavior or accidental engagement with sensitive comments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persists Playwright storage state, which includes authentication cookies, to a local JSON file under the profile directory. Those cookies function as bearer tokens for the Douyin creator session, so if the file or profile directory is copied by another local user, malware, backup system, or included in source control, an attacker may hijack the account without needing the QR login again.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

In --force mode, the script removes the entire profile directory with shutil.rmtree(PROFILE_DIR). Although it logs that force relogin mode is enabled, it does not explicitly disclose that existing browser profile/session data will be deleted, nor does it ask for confirmation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script proceeds directly from CLI invocation into live Playwright-driven replies whenever --dry-run is not set, with no explicit interactive confirmation or second-step approval before sending actions. In a tool whose core purpose is mass replying on a social platform, this raises the risk of accidental bulk posting, misuse with the wrong input file or templates, and unintended actions under an already-authenticated account.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The default configuration forces locale to zh-CN and timezone_id to Asia/Shanghai, which is a natural-language locale policy concern when no user opt-in or documented justification is present in this file. This can cause the skill to operate in a specific language/region context by default regardless of user preference.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Launching a persistent browser context from a reusable profile directory accesses stored login/session material and can act with the creator account's existing authentication. In an automation skill for comment management, this materially increases risk because compromise of the host, profile directory, or downstream code could expose active sessions or enable unauthorized account actions at scale.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script persists scraped works and comment data to local JSON files without explicit consent flow, retention controls, or masking. In this skill context, the harvested data can include usernames, comment content, engagement metadata, and other potentially sensitive creator/community information, increasing exposure if the host is shared or later compromised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The command-line interface claims support for --include-replied, --filter-keyword, and --sort-by, which implies configurable comment selection and output behavior. However, the code path ignores all three arguments and fetch_comments_for_video unconditionally filters results down to unreplied comments before returning them, creating a clear behavior mismatch between the documented interface and actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module documentation and all generated user-facing report text are hard-coded in Chinese, including the HTML lang attribute and report labels. This creates a language/locale policy issue because the skill imposes a specific language on users without opt-in or any documented regional justification in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file presents all triggers, commands, examples, and operational guidance in Chinese and is clearly oriented to Chinese-language interaction, but it does not explicitly state that the skill is region- or platform-specific in a way that justifies the locale constraint. Under the policy, locale constraints should be documented and justified or the user should be offered a language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

All user-facing text in the module is Chinese, and the script configures browser locale settings, but there is no indication that users can opt into another language. Under the stated policy, forcing a specific language without user choice can be a natural-language policy issue unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The browser context is launched with locale and timezone settings taken from configuration, which can force a specific language or locale behavior. In this file there is no visible user choice, opt-in, or justification that the locale restriction is required for a region-specific workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

Natural-language strings in the module docstring, CLI descriptions, and runtime messages are presented only in Chinese. This effectively forces a specific language without user opt-in or explanation of a required locale-specific scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The interface exposes a --video-id parameter, suggesting the tool can target a specific work by ID. In practice, no code reads args.video_id, and the implemented lookup in fetch_comments_for_video searches by video_title text only, so the claimed targeting method is unsupported.

Content

No source excerpt is available for this finding.