Back to skill

Security audit

胡田 OPC导师 公众号运营

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a disclosed WeChat content-operations toolkit, but it includes guidance for evading AI-content detection, weakly disclosed native advertising, and unsafe HTML preview generation.

Install only if you are comfortable reviewing generated content before publishing. Do not use the AI-detection evasion or undisclosed native-ad guidance; clearly label sponsored or affiliate content. Avoid opening generated HTML previews from untrusted Markdown, and check output paths before running the helper scripts on files or directories.

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

T09 · Insecure Skill Coding Practices

Warning
Location
子模块/内容创作模块/scripts/convert_to_html.py:125
Finding

Stored HTML and Script Injection in Markdown Conversion

Content
View full analysis
{cell}') ``` ```python for row in table_rows: result.append('{cell}') for cell in row: result.append(f'') result.append('') ``` ```python def convert_images(self, text): pattern = r'!\[([^\]]*)\]\(([^)]+)\)' def replace_image(match): alt = match.group(1) url = match.group(2).strip() if not url or '占位符' in url or 'placeholder' in url.lower(): return f'
[图片: {alt}]
' return f'{alt}' return re.sub(pattern, replace_image, text) ``` ```python def convert_links(self, text): pattern = r'\[([^\]]+)\]\(([^)]+)\)' def replace_link(match): text = match.group(1) url = match.group(2).strip() return f'{text}' return re.sub(pattern, replace_link, text) ``` ```python def convert_html_blocks(self, text): return text ``` ### Technical Analysis The converter defines an `escape_html()` helper but does not apply it to table cells, headings, link text, image alternative text, URLs, or general article content. It also explicitly preserves existing raw HTML. Consequently, attacker-controlled Markdown can introduce arbitrary HTML into generated preview documents. Exploitable payload types include: - Raw `
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
子模块/内容创作模块/scripts/generate_preview_html.py:35
Finding

HTML Injection Through Unescaped Preview Title

Content
View full analysis
微信公众号文章预览', f'{title}' ) html_doc = html_doc.replace( '', html_body ) ``` ### Technical Analysis The first Markdown heading is treated as the document title and inserted directly into the HTML template without escaping. A crafted heading can close the `` element and introduce arbitrary HTML into the document head or body. For example, a heading containing a closing title tag followed by active markup would be emitted as structural HTML rather than displayed as title text. The same function also inserts the output of the unsafe Markdown converter described in the separate conversion finding. HTML escaping is required even inside `<title>` because untrusted closing tags can terminate the element and change the document structure. ### Attack Path 1. An attacker provides a Markdown document whose first heading contains HTML closing tags and a malicious element. 2. The user or agent invokes `generate_preview_html.py`. 3. The script extracts the heading without validation or escaping. 4. The heading is inserted directly between `<title>` and ``. 5. The generated preview file is opened in a browser. 6. The injected markup is parsed as part of the HTML document and can execute browser-side behavior. ### Impact Assessment The vulnerability does not provide operating-system privilege escalation. Its direct scope is the generated browser preview. Possible consequences include: - Execution of attacker-controlled browser-side markup or script - Remote resource loading and tr ...[truncated 256 chars]
Remediation
View remediation
微信公众号文章预览', f'{safe_title}' ) ``` 2. Validate title length and reject control characters. 3. Use a real template engine with automatic escaping enabled instead of direct string replacement. 4. Sanitize `html_body` independently; escaping only the title does not fix body injection. 5. Add tests with closing title tags, script elements, event handlers, and malformed Unicode in the first heading. 6. Apply a restrictive Content Security Policy when previews are served through HTTP, while treating CSP only as defense in depth rather than a replacement for escaping. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
子模块/IP保护模块/scripts/opinion.py:33
Finding

Unescaped Opinion Content Injected into Generated HTML

Content
View full analysis

{config['emoji']} {config['name']}

{content}

''' ``` ### Technical Analysis The `content` argument is accepted from the command line through `--content` and interpolated directly into an HTML paragraph. It is not escaped or sanitized. An attacker-controlled value can close the paragraph and insert additional elements, event handlers, remote resources, or scripts. The resulting payload is stored in the generated article file and may later be rendered by the preview generator, a browser, or an external editor. Although the opinion type is constrained by `argparse`, the opinion content itself has no equivalent restrictions. ### Attack Path 1. An attacker influences the value supplied to the `--content` option or provides opinion text that another automation component forwards to the script. 2. The value contains closing HTML tags followed by malicious markup. 3. `create_opinion_block()` inserts that value directly into the generated HTML. 4. The script writes the modified article to an output file. 5. The output is opened in a browser, converted into a preview, or pasted into an HTML-capable editor. 6. The injected markup is rendered and may execute active browser-side behavior. ### Impact Assessment No elevated operating-system privileges are obtained. The direct scope is the generated article and any browser or editor context t ...[truncated 421 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A claim of full公众号运营 support, when the actual code is only formatting or Markdown-to-HTML conversion, creates a trust boundary failure: the manifest advertises domain-specific planning and analysis that are not present, while concealing the true operational behavior. Such description-behavior mismatch can bypass user scrutiny and platform policy checks, especially when paired with file manipulation capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A claim of full公众号运营 support, when the actual code is only formatting or Markdown-to-HTML conversion, creates a trust boundary failure: the manifest advertises domain-specific planning and analysis that are not present, while concealing the true operational behavior. Such description-behavior mismatch can bypass user scrutiny and platform policy checks, especially when paired with file manipulation capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

A claim of full公众号运营 support, when the actual code is only formatting or Markdown-to-HTML conversion, creates a trust boundary failure: the manifest advertises domain-specific planning and analysis that are not present, while concealing the true operational behavior. Such description-behavior mismatch can bypass user scrutiny and platform policy checks, especially when paired with file manipulation capabilities.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill hard-codes a protected-attribute style requirement ('must use Chinese/Asian person features') for generated images without tying it to user intent or a legitimate contextual need. In deployment, this can drive discriminatory or exclusionary outputs and increase compliance and reputational risk, especially when the request itself is not ethnicity-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The document provides direct natural-language instructions for making AI-generated content appear human specifically in response to platform detection heuristics. That is evasion guidance: it helps users circumvent integrity controls designed to label, down-rank, or review synthetic content, which can facilitate large-scale deceptive publishing.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
78% confidence
Finding

The skill metadata does not declare any tool restrictions, yet the surrounding package is reported to have file read/write capabilities. When a skill can access the filesystem without explicit scoping, users and orchestrators cannot accurately assess or constrain its operational reach, which increases the chance of unintended file access or modification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The invocation example "帮我运营公众号" is broad and could match many ordinary requests about managing a public account, without clearly delimiting when this specific skill should or should not activate. The file does not provide exclusion conditions or negative examples to narrow the trigger scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

该段将“原生广告”描述为以自然方式融入内容、让读者在“不知不觉中”接收广告信息,实质上鼓励弱化广告可识别性。即使文中后面提到“收取广告费”,也没有明确要求在具体文章中向读者清晰标注“广告/推广/商业合作”,容易导致隐性营销、误导受众,并带来平台合规与广告法风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

“全程自然融入,无明显广告感”直接鼓励将商业推广伪装成普通案例内容,降低用户识别广告的能力。该技能面向公众号运营实务,具有较强可执行性,若被采用会系统性诱导作者规避广告披露义务,损害读者知情权并增加监管处罚风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

该模板建议在工具清单中混入广告主产品,却未要求向用户披露其商业关系,容易让付费推荐伪装成中立选型建议。对于依赖专业判断的技术成果转化类公众号,这种未披露的利益冲突更具误导性,可能影响用户采购或咨询决策。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

标题及全文内容均以中文固定呈现,但文档中没有说明该技能仅面向中文用户,或提供其他语言/本地化选项。根据规则,若技能在自然语言层面强制特定语言且无用户选择或合理地域性说明,可构成语言/locale 政策违规。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation phrases are very broad natural-language requests such as '帮我添加水印和观点模块' and '生成带IP标识的文章', without limiting the skill to a specific file type, workspace boundary, or transformation scope. In an agent environment, this can cause unintended invocation on arbitrary user content and lead to over-application of branding/editing behavior across unrelated tasks, increasing the risk of unauthorized content modification or prompt-trigger ambiguity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

L010 明确说明该技能会“生成多格式输出文件”,后文还包括 .md、.txt、.html 等多个文件,但文档没有在开头或输出说明处明确提醒用户该行为会创建文件并产生哪些产物。对于会影响用户工作区内容的文件生成行为,缺少显式告知会降低可预期性。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L020-L024 将触发条件定义为“生成营销文案或新媒体内容”“输入文章主题、关键词或大纲”等非常常见的表达,缺少明确边界、限定场景或排除条件。这类描述容易覆盖大量普通写作需求,使技能在并非专门需要“微信公众号文章自动创建”时也被调用。

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The skill explicitly optimizes for persuasion through hooks, persona framing, and engagement tactics designed to increase trust and influence while presenting content in a personal first-person style. This is dangerous because it can enable manipulative mass-content generation that obscures AI involvement and makes promotional or agenda-driven material appear more organic and trustworthy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L322-L325明确写明“所有图片必须实际生成后嵌入,不使用占位符”,这是该技能对输出行为的强约束。但L593-L595又说明“如暂无实际图片,使用占位符”,与前述要求直接冲突,会导致执行者对是否真的生成并嵌入图片产生相反理解。

Content

No source excerpt is available for this finding.

Ssd 4

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill directly instructs the model to hide AI characteristics and rewrite output from a personal human perspective, which increases the risk of deceptive authorship and social engineering-style persuasion. In a content-operations skill, this context makes the issue more serious because the output is intended for publication at scale and can systematically mislead audiences about source and authenticity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The template hard-codes only male and female editor personas as default output modes, without a neutral option or explicit user choice. In an agent workflow, this can steer generated content into unnecessary gender profiling and reduce user autonomy, especially if the agent applies the persona automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The image instructions repeatedly require 'Chinese faces' or 'Chinese person' as a mandatory constraint, even when ethnicity is not technically necessary to fulfill the task. This creates a biased generation policy that can improperly enforce protected-attribute targeting and may lead the agent to produce discriminatory or exclusionary outputs without user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document prescribes rigid 'male editor' and 'female editor' personas with stereotyped traits, tones, and audience mappings. In an agent skill, this can systematically encode biased behavior into generated content, leading to discriminatory outputs, exclusion of users, and reputational or compliance risk when the system personalizes content based on gendered assumptions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section explicitly frames platform AI-detection as an obstacle to bypass and presents 'humanizing' as a way to improve recommendation weight by avoiding suspicion. Even though it is not code execution or direct system compromise, it operationalizes deceptive behavior against platform safeguards and omits warnings about policy violations, account penalties, or erosion of user trust.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guidance teaches users how to systematically rephrase AI-authored text to defeat identifiable detector signals such as formal openings, regular structure, and lack of first-person voice. In the context of a公众号运营 skill, this is more dangerous because it is embedded in a workflow intended to scale content production and distribution, increasing the likelihood of policy evasion at volume.

Content

No source excerpt is available for this finding.

Ssd 2

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The later examples, checklists, and tool references turn the evasion concept into a repeatable method: users are given before/after transformations, banned phrases to avoid, and scripts to detect 'AI expression' so they can iteratively optimize content against likely classifiers. This materially increases misuse potential by making detector evasion operational, teachable, and automatable.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python skill includes its main description and all user-facing usage text entirely in Chinese, and later prints only Chinese output as well. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tool's operational interface prints headings, issue reports, suggestions, and result summaries only in Chinese. Because no opt-in, configuration, or fallback language mechanism is provided, the skill enforces a single locale in user-visible behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.