Back to skill

Security audit

抖音评论自动回复

Security checks for vulnerabilities and agentic risk

Overview

The skill openly automates Douyin comment scraping and live replies, but it gives agents broad authority to post from an authenticated account without a review step.

Install only if you are comfortable giving the skill an authenticated Douyin Creator Center browser profile and the ability to post replies. Use a preview or manual approval process outside the skill before running --reply, protect or delete scripts/user-data when done, and prefer pinned dependencies with a lockfile before installing packages.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/reply_comment.js:220
Finding

Untrusted Reply Text Is Inserted into an Authenticated Page as HTML

Content
View full analysis
{ // eslint-disable-next-line no-new-func const resolve = new Function(src + '; return resolveCard(' + JSON.stringify(id) + ');'); const card = resolve(); if (!card) return { ok: false, reason: 'card-gone' }; const ce = Array.from(card.querySelectorAll('[contenteditable="true"]')) .find(el => /^回复\s/.test((el.getAttribute('placeholder') || el.getAttribute('aria-placeholder') || ''))); if (!ce) return { ok: false, reason: 'no-input' }; ce.focus(); // ★ 用 innerHTML 而不是 innerText,保留 emoji / 多行结构 ce.innerHTML = text; // ★ 派发 InputEvent 触发 React 状态更新(已实测:disabled 翻转为 false) ce.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertText', data: text, })); return { ok: true, len: ce.innerText.length }; }, { id: target.id, src: resolveSrc, text } ); ``` ### Technical Analysis The reply value is assigned to `innerHTML`, causing the browser to parse it as markup rather than treating it as plain reply text. No HTML sanitization or character allowlist is applied beforehand. The value can originate from CLI input or from LLM-generated output. Under the documented automatic-reply workflow, the LLM reads untrusted public comments and generates text that is sent without an approval stage. A malicious comment could therefore attempt to influence the generated reply into containing HTML. Elements with executable event attributes or network-loading behavior may become active when parsed inside the authenticated Douyin Creator Center page. The nearby `new Function` use was also reviewed. Its source is locally generated by `makeResolveCardJS()`, while the identifier is JSON-escaped, so it does not provide the primary attacker-cont ...[truncated 1691 chars]
Remediation
View remediation
`, and HTML entities as literal text rather than markup. 4. Add tests with payloads such as HTML tags, quoted attributes, multiline content, emoji, and angle brackets. Verify that the editor displays the exact literal text and creates no additional DOM elements. 5. Add an optional review or dry-run stage for LLM-generated replies. This reduces the likelihood that malicious comment content can influence an automatically posted response. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:23
Finding

Unpinned Dependency Installation Permits Unaudited Supply-Chain Changes

Content
View full analysis
/scripts # 1. 检查 playwright npm 包(缺失则装,约 30 秒) node -e "require('playwright')" 2>/dev/null || npm install # 2. 检查 chromium 浏览器(缺失则装,约 1-2 分钟) npx playwright install chromium --dry-run 2>&1 | grep -q "is already installed" || npx playwright install chromium ``` The dependency declaration also uses a floating compatible-version range: ```json "dependencies": { "playwright": "^1.40.0" } ``` No lockfile was present in the audited project structure. ### Technical Analysis The installation procedure runs `npm install` against a dependency declared as `^1.40.0`. This permits npm to select later compatible Playwright versions and their transitive dependencies instead of installing the exact dependency graph reviewed during this audit. The project does not include a `package-lock.json`, so dependency versions and integrity hashes are not fixed. Package installation can also execute npm lifecycle behavior with the permissions of the user or agent running the Skill. The subsequent `npx playwright install chromium` command downloads browser artifacts according to the dynamically resolved Playwright package. This is a supply-chain weakness rather than evidence that the current Playwright package is malicious. No typosquatted dependency or known malicious source was identified in the reviewed files. ### Attack Path 1. The Skill is run on a system where Playwright is absent. 2. The documented environment setup automatically invokes `npm install`. 3. npm resolves the caret dependency and transitive packages at installation time without a committed lockfile. 4. A compromised future package release, registry account, dependency, or resolution result is downloaded. 5. Package installation or lifecycle logic executes with the permissions of the agent or local user ...[truncated 846 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (27)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个面向 CLI 的抖音评论管理与自动回复工具,核心能力应包括读取评论、根据规则处理、生成回复并发送。所给代码块却只是一个页面交互模块,作用范围局限于“选择作品”弹窗:识别登录状态、等待作品列表加载、读取作品标题/日期/评论数、以及点击切换作品。虽然它与声明场景相关,属于评论管理工作流中的前置辅助步骤,但它并不能支撑声明中的主要功能,且没有任何 CLI 参数处理、评论数据抓取或回复发送逻辑。因此描述与该代码块实际行为存在明显且实质性的能力不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file explicitly defines a fully automated chain where the agent decides which comments to answer, generates the text, and sends replies with no approval or dry-run step, despite acknowledging the action is irreversible. In the context of a social-media posting skill, that is dangerous because model mistakes, prompt injection in comment content, misclassification of prior replies, or poor persona matching can directly cause unauthorized, reputationally damaging, or privacy-impacting posts to a live external platform.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README content is entirely in Chinese and provides no indication that other languages are supported or that the user can choose their preferred language. This creates a natural-language policy concern because the skill appears to impose a specific language/locale without user opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill invokes shell commands, installs packages, and relies on environment state, but it does not declare an explicit tool/permission scope. That creates unclear execution boundaries for an agent and increases the risk of unintended command execution or environment modification beyond what a user expects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The description advertises multiple activation phrases and a full scrape-to-generate-to-send workflow but does not define strict boundaries for when write actions are permitted. In context, that ambiguity increases the chance of unintended account actions, especially since the skill explicitly states there is no approval gate before sending replies.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger conditions are broad enough to activate a workflow that culminates in direct message posting without an approval or dry-run step. Over-broad activation is especially dangerous here because a casual request about comments could be interpreted as authorization to generate and publish public replies from the user's account.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The skill's environment check uses unpinned npx playwright install chromium, which may resolve and execute an unexpected version. In a skill that automates authenticated actions on a creator account, this meaningfully raises supply-chain and integrity risks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow is tied to broad natural-language triggers for an irreversible external action: scraping creator comments, generating reply text with an LLM, and posting replies automatically. Because the skill explicitly allows vague invocations and defaults to the first work when title/index is omitted, it increases the chance of accidental activation or acting on the wrong target, especially in an agent setting where trigger matching may be imperfect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation explicitly states that the workflow performs comment fetching, rule evaluation, LLM text generation, and direct reply submission with no approval step and no dry-run. For a public social-media account, this creates a real risk of irreversible or inappropriate posting caused by model error, bad matching, or automation mistakes, especially because the action affects an external platform immediately.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file states that when there is exactly one match, the system will send a reply directly, but it provides no warning that this action posts to a live Douyin account and has no approval checkpoint. Because the overall skill workflow already emphasizes direct sending with no dry-run, this documentation normalizes potentially irreversible external actions and increases the risk of accidental or unsafe bulk replies.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation explicitly advises bypassing the normal author + content matching workflow by writing a custom script that directly calls an internal reply function by comment ID. In this skill's context, that weakens intended safety boundaries and enables precise live posting to an external platform without approval, dry-run, or built-in validation, increasing the chance of unintended or abusive automated replies.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The markdown not only suggests bypassing matcher safeguards with a custom script, but also omits any warning about the risks of direct posting by ID. In a skill designed for automated comment replies, this makes the issue more dangerous because it facilitates exact-target live actions outside the declared workflow, reducing traceability and increasing the chance of misuse, spam, or replying to the wrong user/comment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guide explicitly recommends bypassing the normal author/content matching safeguards by calling replyToComment directly on a comment ID. In this skill's context, replies are sent directly with no approval or dry-run step, so bypassing targeting checks materially increases the chance of sending unauthorized, incorrect, or abusive replies to the wrong comment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The troubleshooting guidance encourages direct sending through a script path that bypasses the documented matching safeguards, without warning that this can defeat deduplication and targeting protections. Because the workflow has no approval node and sends messages live, misuse can immediately cause misdirected replies, spam, or brand/account harm.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document states that the persistent browser profile stores cookies and localStorage but gives no warning about the sensitivity of that data or how it should be protected. In a creator-center automation skill, those artifacts can contain authenticated session material, so careless storage, copying, or sharing could enable account takeover or unauthorized access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This function programmatically extracts user-generated comments, usernames, reply relationships, timestamps, and avatar URLs from the Douyin creator page and returns them for downstream processing. In the broader skill context, that data is then fed into automated reply generation and direct sending with no approval or dry-run step, which increases privacy and misuse risk because personal data is collected and acted on without any explicit consent, minimization, or operator warning in this workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This is a natural-language policy issue because the skill presents its operational instructions, warnings, and CLI help in a single forced language. Users who do not read Chinese are not given an opt-in choice, which can impair safe use of reply functionality and other actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code’s natural-language interface is explicitly Chinese in its top-level comments and later user-facing strings, with no indication that language choice is configurable or limited to a justified region-specific context. Under the policy, forcing a specific language without user opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The reply workflow performs direct bulk replies to an external platform with no approval, confirmation, or dry-run gate, which increases the chance of unintended posting, spam-like behavior, and irreversible account actions. In this skill's context, the risk is elevated because the stated workflow explicitly chains comment scraping, rule-based selection, LLM-generated text, and immediate sending, making accidental or unsafe outbound actions more likely.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is hard-coded around Chinese-language UI labels such as "回复", "发送", and "取消", and the file-level comments describe behavior only for that locale. This creates a locale policy issue because the automation requires a specific language environment without offering user choice or explicitly documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All instructions, examples, and trigger phrases are presented only in Chinese, and the workflow assumes Chinese-language commands and reply generation style. There is no indication that users can choose another language or that the Chinese-only constraint is an intentional, justified locale limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

Natural-language policy issues include forcing a specific language without user opt-in. This skill documentation is entirely Chinese and does not indicate that the language choice is optional or that the skill is intentionally restricted to a Chinese-speaking or region-specific audience.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/reply_comment.js:129