Back to skill

Security audit

微信公众号排版引擎

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its WeChat formatting purpose, but it forces publisher branding into user articles and can overwrite trusted theme files without adequate safeguards.

Review this skill before installing. It is not showing clear exfiltration or system backdoor behavior, but it will add Qomob.AI attribution to formatted articles unless modified, and its theme-generation path can persistently change trusted theme files. Use it only if that attribution is acceptable, avoid untrusted PDFs/images/HTML, and do not run extraction with output names matching built-in themes such as emerald, graphite, sunset, ocean, or rose.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:190
Finding

Mandatory Third-Party Branding Injection into User Content

Content
View full analysis
list[str]: """运营维度检查:标题长度、段落长度、图片数、阅读时长、版权脚注(warnings 级别)。""" warnings = [] # 版权脚注:所有产物必带固定版权行(完成判据之一) if COPYRIGHT_FOOTER not in html: warnings.append( f"未检测到版权脚注({COPYRIGHT_FOOTER})," f"正文末尾必须追加通用库「版权脚注」组件" ) ``` The corresponding completion requirement in `SKILL.md:190` mandates the same footer in every Mode A result and declares output without it incomplete. ### Technical Analysis The Skill requires an unrelated third-party attribution to be inserted into every formatted article. This requirement is not presented as an optional formatting feature. Instead, it is embedded in the authoritative Skill instructions, common components, workflow completion criteria, validator logic, and regression fixtures. The validator treats omission as a warning, while the higher-level Skill instructions classify the footer as a mandatory completion condition. This combination causes an agent loading the Skill to alter user-authored content in favor of the Skill publisher, even when the requested task is only HTML formatting. This is instruction hijacking because the Skill modifies the agent's output objective from “format the user's article” to “format the article and promote Qomob.AI.” Software licensing notices can legitimately apply to copies of the software itself, but should not automatically be inserted into content produced with the software. ### Attack Path 1. A user asks the agent to format an article for WeChat. 2. The agent loads `SKILL.md` and routes the request to Mode A. 3. The Mode A completion ...[truncated 928 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/style_extractor.py:701
Finding

Unvalidated Theme Name Allows Trusted Theme Files to Be Overwritten

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:6
Finding

Unpinned Third-Party Dependencies Produce Non-Reproducible Installations

Content
View full analysis
=2.28.0 beautifulsoup4>=4.11.0 pillow>=9.0.0 pymupdf>=1.23.0 ``` The documented installation flow executes: ```bash pip install -r requirements.txt ``` ### Technical Analysis The declared package names are legitimate and no suspicious package index or typographical dependency was identified. However, every dependency has only a lower version bound. Consequently, an installation can resolve to any future version accepted by pip. This makes the environment non-reproducible and causes users to execute dependency versions that were not necessarily reviewed with the Skill. The image and PDF libraries also process complex, attacker-supplied file formats, increasing the importance of controlled and promptly maintained versions. No evidence indicates that the current dependencies are malicious. The issue is the absence of version and integrity controls, not a confirmed compromise of any listed package. ### Attack Path 1. A user follows the documented installation instructions. 2. pip queries the configured package index. 3. It selects the newest versions satisfying the lower bounds. 4. Package installation code and subsequently imported package code execute with the user's privileges. 5. A future compromised, incompatible, or unexpectedly changed release can affect the Skill without any change to this repository. 6. The extractor later processes web pages, images, or PDFs through those unreviewed versions. ### Impact Assessment The immediate codebase does not directly grant additional privileges through this issue. Any impact depends on a malicious or vulnerable dependency release. Potential scope includes: - Code execution with the privileges of the user running pip or the Skill. - Exposure or modification of files accessible to that user. - Parser crashes or denial ...[truncated 302 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (57)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code chunk does not implement the declared end-user functionality of converting Markdown to WeChat-compatible HTML or extracting styles from WeChat article URLs. Instead, it is a developer-facing evaluation script for regression testing HTML fixture outputs using a validator. This is materially different in primary purpose and capabilities. While such a script could support the broader project, this specific code chunk's behavior is unrelated to the declared skill behavior presented to users.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个“公众号排版引擎”,核心卖点包括把 Markdown 转成可直接粘贴进公众号编辑器且样式不丢失的 HTML,以及从公众号 URL 提取风格。给出的代码文件却是独立的 style_extractor.py,其功能集中在抓取/读取多种来源(公众号 URL、本地 HTML、图片、PDF、md/txt/docx)并提取颜色、字体、间距等风格特征,最后输出主题组件库说明文档。生成内容中虽然包含大量 HTML 组件模板和 片段,但这些是固定模板文本,不是对任意输入 Markdown 的解析与转换结果。代码中也没有 Markdown 解析、HTML 渲染、样式内联、公众号粘贴兼容处理等实现。因此,代码只覆盖了声明中的“风格提取”子能力,且扩展到了图片/PDF/文档品牌素材提取,但缺失了声明的主要排版转换能力,属于实质性描述-行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a generation engine: Markdown-to-WeChat-HTML conversion plus style extraction from article URLs. The supplied code instead is purely a validator for already-produced HTML. Its primary function is checking compliance with WeChat editor constraints and issuing errors/warnings. It contains no Markdown parsing, no HTML generation pipeline, no URL fetching, no scraping, and no style/component-library extraction. Additionally, it enforces several undeclared QA/ops rules, such as requiring a fixed copyright footer, estimating reading length, warning on missing images, and checking color contrast. This is a material description-behavior mismatch, not just an internal implementation detail.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README advertises fetching public article URLs and processing uploaded HTML, images, PDFs, and docs without clearly warning users that external content will be retrieved and parsed. This creates privacy and security risk because users may unknowingly cause the system to contact third-party servers, process sensitive files, or ingest untrusted content into downstream tooling.

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 and overlap with ordinary requests about formatting, style extraction, and brand references, which can cause unintended activation of this skill. In an agentic environment, misrouting can lead to unexpected processing of user content, external fetching, or output transformations the user did not intend.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that body text is automatically normalized to Chinese full-width punctuation, which is a locale-specific formatting rule. The document does not indicate that this behavior is optional, user-selectable, or limited to a clearly documented region-specific use case.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises and orchestrates file reads, file writes, and network access, but it does not declare any explicit tool scope or permissions boundaries. In an agent setting, missing scope declarations can cause over-broad tool access, making unintended filesystem modification or URL fetching easier if the skill is triggered in the wrong context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill accepts arbitrary WeChat article URLs for style extraction without clearly disclosing network access or privacy implications. This can lead users to unintentionally trigger external requests, leak access patterns, or process sensitive/internal URLs if the environment permits them.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The instruction says body text will automatically normalize to Chinese full-width punctuation, which imposes a specific locale/typography policy. There is no nearby opt-in, user choice, or limitation stating this applies only when the user wants Chinese WeChat-style output, so it can conflict with the language/locale policy rule.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The eval prompt wording includes broad natural-language triggers such as '公众号排版' and '直接排,不用问我', which are close to ordinary user requests and do not appear tightly scoped to explicit routing guards. In a skill-routing system, this can cause over-broad activation or misrouting, making the agent apply this skill when the user intended a different transformation or a safer review step.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The style-extraction prompt asks to extract style from a WeChat article URL, but the request scope is not bounded beyond a brief whitelist expectation inside the eval. Ambiguous extraction tasks can lead agents to fetch and imitate arbitrary third-party content too broadly, increasing risks of unintended scraping behavior, copyright/style cloning concerns, or routing to network-enabled actions without sufficient user confirmation and domain validation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This HTML tutorial is presented entirely in Chinese, including the main title and instructional content, with no indication that the user can opt into another language. Under the policy for natural-language violations, forcing a specific language without user choice is in scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This HTML tutorial is entirely written in Chinese, including the title, body, and authoring text, with no indication that language selection is optional or that the skill is intentionally region-specific. Under the language/locale 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
88% confidence
Finding

This HTML content consistently presents instructions, headings, and explanatory text only in Chinese, such as the tutorial title and all operational guidance. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is documented and justified, which is not evident here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This HTML file contains user-facing instructional content exclusively in Chinese, including the title, body text, and calls to action. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger query "帮我排一下公众号" is broad enough to match casual formatting help requests without clearly constraining the task to this specific skill. Over-broad routing can cause the agent to invoke a capability in unintended contexts, leading to incorrect handling of user intent or unsafe application of HTML/style transformation logic.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The single-term trigger "微信排版" is ambiguous and may refer to general messaging formatting, chat content cleanup, or unrelated design tasks rather than this skill's specialized WeChat article pipeline. Ambiguous triggers increase the chance of accidental invocation and misrouting, which weakens policy separation between skills.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger "提取这个公众号的风格" is broad and does not bound the source, authorization expectations, or the type of extraction being requested. In this skill context, broad style-extraction triggers are riskier because they can encourage scraping or imitation workflows without enough gating around URLs, ownership, or acceptable use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The English trigger "format for WeChat" is highly generic and may match unrelated requests about message formatting, social posting, or app UI conventions rather than public-account article rendering. Generic English triggers broaden activation surface and make unintended routing more likely, especially in multilingual environments.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger "风格提取" is too generic to safely indicate WeChat public-article style extraction specifically. In this skill, generic extraction language is more dangerous because it can match broad imitation or scraping-like requests without sufficient context, increasing risk of misuse and erroneous invocation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger "主题提取" is highly generic and could refer to theme extraction across many domains, including presentations, websites, or design systems unrelated to WeChat articles. Because this skill already overlaps with design/formatting domains, such generic phrasing increases cross-skill collisions and mistaken invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file is written entirely in Chinese and uses prescriptive language such as '所有文字节点必须用' and other mandatory formatting rules without indicating that other languages are allowed. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The rule allows broad phrases like “直接排/一键/不用问” to skip structural confirmation for non-Markdown inputs, which can cause the system to silently infer the wrong document hierarchy before formatting. In this skill’s context, that can produce materially misleading article structure, broken headings, or misplaced content without giving the user a chance to catch the error.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document states that body text will be automatically normalized to Chinese full-width punctuation, which forces a specific locale-dependent writing style. The instructions do not offer the user a choice or indicate that this is optional, so it fits the policy category for language/locale constraints without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This line explicitly says punctuation in the body must uniformly use full-width Chinese punctuation and curved quotes. Because the rule is framed as universal and does not provide user opt-in or a justified regional limitation, it is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.