Back to skill

Security audit

Wechat Mp Publisher

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a WeChat public-account workflow, but it has a real unsafe HTML-preview generation issue and some broad data-collection/persistence behavior users should review before installing.

Review this before installing if you expect to process drafts from other people or downloaded sources. Do not open generated HTML previews from untrusted Markdown until the preview generator is fixed to escape or sanitize HTML and image attributes. Also expect topic keywords, competitor names, and searches to be sent to Sogou WeChat and saved under workspace/wechat_data, and avoid storing sensitive account secrets in the config file.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/article_builder.py:87
Finding

Stored HTML and JavaScript Injection in Generated Article Previews

Content
View full analysis
\n" in_list = False html_content += f'

{stripped[3:]}

\n' elif stripped.startswith("### "): if in_list: html_content += "\n" in_list = False html_content += f'

{stripped[4:]}

\n' # Lists elif stripped.startswith("- ") or stripped.startswith("* "): if not in_list: html_content += "
    \n" in_list = True html_content += f'
  • {stripped[2:]}
  • \n' elif re.match(r'^\d+\.\s', stripped): if not in_list: html_content += "
      \n" in_list = True html_content += f'
    1. {re.sub(r"^\d+\.\s", "", stripped)}
    2. \n' # Quotation elif stripped.startswith(">"): if in_list: html_content += "
\n" in_list = False html_content += f'
{stripped[1:].strip()}
\n' # Image elif stripped.startswith("!["): alt_match = re.search(r'!\[(.*?)\]', stripped) src_match = re.search(r'\((.*?)\)', stripped) alt = alt_match.group(1) if alt_match else "" src = src_match.group(1) if src_match else "" html_content += f'{alt}{alt}\n' # Body else: if in_list: html_content += "\n" in_list = False formatted = line formatted = re.sub(r'\*\*(.*?)\*\*', r'\1', formatted) ...[truncated 3796 chars]
Remediation
View remediation
` elements. - `` payloads. - Quote-breaking image URLs and alternative text. - Malicious headings, list entries, quotations, titles, and author names. - Unsafe URI schemes. 8. Document that article drafts are untrusted input and should not be rendered or opened until sanitization has completed. ]]>
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 (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

描述将技能定位为“公众号自动化运营”全流程工具,但给出的代码仅完成文章草稿的排版预览和基础统计分析。脚本只访问本地文件系统,生成 HTML 和 JSON 输出,没有网络请求、平台 API 调用、账号管理、发布动作,也没有任何数据采集、选题分析或自动写作逻辑。虽然“自动排版”这一点与 Markdown 转 HTML 预览部分部分相关,但整体宣称范围远超代码实际能力,且主功能明显更窄,因此属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description claims a broad公众号 automation workflow covering content ideation, article writing, auto-formatting, account setup, and publication syncing. The supplied code chunk only implements data acquisition and simple analysis modes: trending topic collection, competitor article search, keyword mining, and topic search using Sogou WeChat pages. It writes local CSV/JSON files under workspace/wechat_data and performs no content generation, no media/layout automation, no account management, and no publishing to WeChat or other systems. The data-collection portion does align with part of the description, but the declared overall purpose materially overstates what this code actually does, so this is a mismatch.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill describes capabilities that imply network access plus reading and writing local files, but it does not declare any explicit tool scope or permissions boundary. That makes the effective authority ambiguous and increases the risk of over-broad execution, unexpected data collection, and silent persistence of scraped content or account-related data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad enough to match many ordinary writing or publishing requests, which can cause the skill to activate in contexts the user did not intend. In a skill that contemplates scraping, local persistence, and account-related publishing workflow, over-triggering increases the chance of unnecessary data access, collection, or output generation without clear informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill promotes collecting and saving data from external platforms but does not warn users that third-party content and derived datasets may be fetched, retained locally, or subject to platform terms and privacy constraints. This is dangerous because users may unknowingly initiate scraping and persistence of external data, creating privacy, compliance, and data-handling risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The decision-table routing uses ambiguous terms such as '采集', '发布', and '数据分析' without strong scoping, so routine requests may be routed into more sensitive flows like network collection or account/publishing preparation. Because this skill is framed as end-to-end automation, ambiguous routing makes unintended activation more dangerous than in a purely local drafting assistant.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that it will save account configuration to workspace/wechat_config.json but does not warn users about persistence of account-related data, sensitivity of those fields, retention, or access controls. Storing configuration without explicit notice and minimization can expose identifiers or other operational metadata to unintended reuse, leakage, or misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire template is written as mandatory Chinese-language article structure and examples, which implicitly constrains outputs to Chinese. There is no indication that the user can opt into another language or that this is a region-specific template with a documented justification, so it conflicts with the language/locale policy described in SQP-3.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file is entirely written as a mandatory publication checklist for a public-account workflow in Chinese, with no indication that language choice is optional or limited to a justified region-specific context. Under the policy rule for language or locale constraints, this can be read as forcing a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level documentation says the script is an article generation and formatting tool and includes '支持配图建议', with usage text implying it can turn a draft into a finished article. In implementation, the script only reads a local markdown file, computes statistics, and writes an HTML preview plus JSON stats; it does not generate article content or image suggestions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language description and CLI/user-facing behavior are entirely fixed to Chinese-language article generation for a WeChat public-account context. The policy requires flagging language or locale constraints when the skill forces a specific language without user opt-in, and no alternative locale or language selection is offered here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generated preview HTML sets lang="zh-CN", which enforces a specific locale in output. Under the policy, locale-specific behavior should either be user-selectable or clearly justified as region-specific; this file does not provide a user choice or explicit justification in code comments/help.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends HTTP requests to external services and includes user-influenced search terms without giving a clear user-facing warning or consent step. In this skill context, queries may reveal business interests, competitor targets, or content strategy, so silent transmission creates a real privacy and data-handling risk even though it is not arbitrary code execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The Accept-Language header forces a zh-CN preference, which is a natural-language locale constraint embedded in code. The file does not offer the user any language or locale choice, nor does it document a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The usage line documents '--preview' as if it directly accepts/operates on a file, but argparse defines '--preview' as store_true and the program then uses args.input or a hardcoded 'draft.md'. This is an active mismatch between documented intent and actual invocation behavior, which can mislead operators about what file is processed.

Content

No source excerpt is available for this finding.