Back to skill

Security audit

Toutiao Publish

Security checks for vulnerabilities and agentic risk

Overview

This skill is clearly meant to automate Toutiao publishing, but it can automatically post to a real logged-in account and contains unsafe browser-JavaScript injection patterns.

Review this carefully before installing. Use only with a disposable or intended Toutiao account, do not feed it untrusted article content, and prefer stopping at draft or preview until the skill adds explicit final confirmation and safer argument handling.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
publish-toutiao.sh:7
Finding

User-Controlled Content Is Interpolated into Executable JavaScript

Content
View full analysis
{ const editor = document.querySelector('.ProseMirror'); if (!editor) return '错误:未找到编辑器'; // 注入内容 editor.innerHTML = \`$CONTENT\`; // 触发完整事件序列 editor.dispatchEvent(new Event('input', { bubbles: true })); editor.dispatchEvent(new Event('selectionchange', { bubbles: true })); editor.dispatchEvent(new CompositionEvent('compositionend', { bubbles: true, data: editor.innerText })); return '内容注入完成,共' + editor.innerText.length + '字'; }" }" ``` A substantially similar unsafe interpolation pattern is also presented as recommended usage in `SKILL.md`, lines 531-540. ### Technical Analysis The second command-line argument is stored in `CONTENT` and then substituted directly into the source of a JavaScript function passed to the browser automation tool. The value is placed inside a JavaScript template literal without JavaScript or JSON encoding: ```javascript editor.innerHTML = `$CONTENT`; ``` The shell performs the substitution before the request reaches the browser. A value containing a backtick can terminate the intended template literal and append arbitrary JavaScript statements. Template-literal expressions such as `${...}` can also cause supplied expressions to execute while the function is evaluated. The resulting code runs in the context of an authenticated `mp.toutiao.com` page. This is not limited to ordinary HTML injection into the article editor; it permits execution of attacker-controlled JavaScript through the browser evaluation interface. Other arguments, including `TITLE`, `IMAGE_KEYWORD`, and `COVER_KEYWORD`, are als ...[truncated 2095 chars]
Remediation
View remediation
{ const editor = document.querySelector('.ProseMirror'); if (!editor) return 'Editor not found'; const content = %s; editor.innerHTML = content; editor.dispatchEvent(new Event('input', {bubbles: true})); return editor.innerText.length; }""" % json.dumps(content) } print(json.dumps(request)) PY ) browser act request="$REQUEST" ``` Where supported, passing `content` as a separate evaluation argument is preferable to generating function source, even when JSON encoding is used. ]]>

other

Note
Location
SKILL.md:12
Finding

Declared Shell Permission Scope Does Not Match Executed Commands

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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (17)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises fully automated publication to a third-party platform but does not prominently require explicit, per-action user confirmation before initiating or completing a live post. Because the workflow includes browser automation, DOM injection, checkbox selection, and final publish clicks, accidental invocation could immediately cause unauthorized or unintended public posting under the user's logged-in account.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script proceeds through the final publish flow and clicks the confirmation button automatically without any explicit user approval checkpoint. In this skill context, publication is an external, irreversible action on a live content platform, so automation errors, bad inputs, or manipulated page state can cause unintended public posting from the user's account.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README promotes fully automated posting to a live Toutiao account but does not prominently warn that publication is irreversible or that content will be posted under the user's authenticated identity. Because this skill operates on a logged-in browser session and culminates in 'preview and publish' flows, accidental invocation can directly create public posts, reputational harm, or policy violations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation examples include broad natural-language commands such as publishing content or using AI to write and publish, but they do not define clear scope limits, confirmation requirements, or exclusions. In an agent environment, ambiguous triggers can cause the skill to perform account-affecting actions from loosely phrased user input, increasing the risk of unintended posting.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The release notes advertise a one-click publishing script and show direct invocation of ./publish-toutiao.sh without a prominent warning that it performs a real post to a live Toutiao account when authenticated. In the context of a browser-automation skill that targets a public publishing platform, this can mislead users into unintentionally posting content, causing account misuse, reputational harm, or accidental disclosure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases on these lines include very broad terms such as '发文章' and '写头条' that can plausibly appear in ordinary user conversation and cause accidental activation of an automated publishing skill. In the context of a skill that can publish content to a real external platform, unintended invocation could lead to unauthorized posting, misuse of account privileges, or disclosure of draft content.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The extended trigger list uses ambiguous phrases like '自动发布' and '内容发布' without any scope restriction, making it easy for unrelated requests to match this skill. Because the documented skill performs automated publication workflows, ambiguous activation materially increases the risk of accidental execution against a connected Toutiao account.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases are broad enough to match ordinary writing or publishing requests, which can cause the agent to invoke a live-posting skill when the user may only want drafting help. In the context of a skill that performs external publication, overbroad activation materially increases the risk of unintended content posting to a real platform.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The 'known limitations' section says '正文图片暂不支持本地上传' and requires AI-recommended images, indicating no local body-image upload capability. However, the update log later states '新增图片上传智能重试' and earlier versions mention '拖拽图片上传', which directly suggests upload support exists or was introduced, creating contradictory intent/documentation within the skill file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script's natural-language interface, UI matching strings, and usage text are entirely fixed to Chinese terms such as "今日头条", "个人观点", and "确认发布". This forces a specific language/locale behavior without any documented opt-in or fallback, which fits the language-policy violation category.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sets editor.innerHTML directly from the untrusted CONTENT argument while presenting the step as normal text input. This allows arbitrary HTML to be injected into the page editor, which can alter article structure, embed unintended markup, or potentially trigger scriptable behaviors depending on the editor's sanitization, making the published content materially different from what a user expects.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script presents itself as a verification test, but it opens a live Toutiao publishing page and actively types a title, injects body HTML, and interacts with cover/AI content workflows. Even if final submission is skipped, modifying a live draft page can create unintended drafts, alter existing content, or trigger side effects in a real account context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script navigates to a live content-publishing page and immediately performs browser-driven modifications without a clear upfront warning or consent gate. In an agent or automation setting, this increases the risk of silently altering live account data, especially if run by users who assume it is a harmless diagnostic.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The safety comment is misleading because earlier test steps already perform state-changing actions on the live publish page before the final publish step is skipped. This can give operators a false sense of safety and lead to unexpected draft creation or content contamination in a production environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

All user-facing documentation and invocation examples are presented in Chinese, with no indication that the skill supports other languages or that Chinese-only use is an intentional, justified locale constraint. Under the stated policy, forcing a specific language without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The package description is written only in Chinese, which imposes a language choice in user-facing metadata without offering an alternative or opt-in. This can violate language/locale policy where skills are expected to provide user choice or clearly document a justified regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script's comments and all user-visible status messages are in Chinese, which effectively imposes a specific language on users. There is no indication that the skill is intentionally region-specific or that users can opt into another language.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.