Back to skill

Security audit

Wemp Ops

Security checks for vulnerabilities and agentic risk

Overview

This WeChat operations skill is broadly coherent, but it should go to Review because it ships real-looking WeChat credentials and gives the agent high-impact account mutation and posting capabilities with unsafe defaults.

Install only after rotating/removing the bundled WeChat secret, narrowing triggers to explicit WeChat tasks, disabling automatic deletion/retention/writeback by default, fixing the Markdown upload code-injection bug, and reviewing whether this skill should be allowed to publish, message followers, alter account settings, or use logged-in browser sessions.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
config/default.json:2
Finding

Hardcoded WeChat API credentials stored in the repository

Content
View full analysis
Date.now()) return tokenCache.token; const account = getWempAccount(); const url = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${account.appId}&secret=${account.appSecret}`; const resp = await fetch(url); const data = await resp.json(); if (data.errcode) throw new Error(`获取 Token 失败: ${data.errcode} - ${data.errmsg}`); tokenCache = { token: data.access_token, expiresAt: Date.now() + (data.expires_in - 300) * 1000 }; return tokenCache.token; } ``` ### Technical Analysis A non-placeholder WeChat AppID and 32-character AppSecret are committed directly to a distributable configuration file. Every person or system with access to the package can read the secret without bypassing any access control. The network request itself is consistent with the declared WeChat integration and targets the official `api.weixin.qq.com` service. The vulnerability is the exposure and distribution of the credential, not covert exfiltration by that request. Repository deletion alone is insufficient if the value has already been published, cached, mirrored, or ret ...[truncated 1032 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/markdown_to_html.py:146
Finding

Arbitrary JavaScript execution through unescaped image-path interpolation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/markdown_to_html.py:35
Finding

HTML and active-content injection in generated article previews

Content
View full analysis
{escape(m.group(1))}', text) text = re.sub(r'\*\*\*(.+?)\*\*\*', r'\1', text) text = re.sub(r'\*\*(.+?)\*\*', r'\1', text) text = re.sub(r'\*(.+?)\*', r'\1', text) text = re.sub(r'!\[([^\]]*)\]\(([^)]+)\)', r'\1', text) text = re.sub(r'\[([^\]]+)\]\(([^)]+)\)', r'\1(\2)', text) return text ``` Representative output sinks include: ```python elif t == 'paragraph': text = parse_inline(block['content']).format(**s) parts.append(f'

{text}

') ``` ```python elif t == 'image': src = block['src'] alt = block['alt'] # ... parts.append(f'

{escape(alt)}

') ``` Preview mode opens the generated local HTML: ```python if args.preview: import webbrowser webbrowser.open(f'file://{output_path.resolve()}') ``` ### Technical Analysis The converter constructs HTML with regular-expression substitutions but does not escape ordinary Markdown text before inserting it into the document. Raw tags and event-handler attributes can therefore survive conversion. Image `src` values are also inserted into an HTML attribute without attribute-safe encoding or a URL-scheme allowlist. Escaping only inline code and standalone image alternative text is insufficient. Paragraphs, headings, list items, table cells, blockquotes, and URL-bearing attributes all require context-appropriate encoding. The risk is m ...[truncated 1324 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/publisher.mjs:44
Finding

Same-title drafts are deleted automatically without explicit authorization

Content
View full analysis
0) { console.error(`[清理] 已删除 ${cleaned} 个同标题旧草稿`); } else { console.error(`[清理] 无同标题旧草稿`); } } ``` Draft creation invokes cleanup by default: ```javascript if (!args.noCleanup) { await cleanupOldDrafts(title); } ``` ### Technical Analysis Creating a draft causes the program to list recent drafts and irreversibly delete every matching title among the first 20 results. A title is not a stable identifier and does not prove that the existing draft is an obsolete version of the new article. The behavior is enabled by default. Users must know to specify `--no-cleanup` to preserve existing same-title drafts. The deletion also occurs before the replacement draft is successfully created, so an upload or API failure can leave the account without either version. ### Attack Path 1. An attacker or mistaken operator chooses the title of an existing valuable draft. 2. The operator runs the normal draft-creation command without `--no-cleanup`. 3. The script retrieves the first 20 drafts. 4. Every draft whose first article has the same title is deleted. 5. The subsequent cover upload or draft-creation request may succeed or fail; the previous drafts have already been removed. ### Impact Assessment Exploitation or accidental trigger ...[truncated 358 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/lib/utils.mjs:209
Finding

Shared API library exposes account-administration operations beyond the documented workflows

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (53)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a broad公众号运营 workflow: collecting素材 is only one small part, while the main advertised capabilities include writing articles, beautifying layout, generating covers, publishing to WeChat drafts, viewing account data, and managing comments. The supplied code does none of those. It is narrowly focused on fetching trending news from external public websites/APIs and printing results as JSON. Although this partially aligns with the '采集热点/素材' portion of the description, the actual code's primary purpose is materially narrower and different from the declared full lifecycle WeChat operations skill. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a broad公众号运营 workflow spanning ideation, material gathering, drafting, beautification, publication, analytics, and comment management. The actual code only implements one narrow piece of that pipeline: converting Markdown into WeChat-compatible HTML with themes, preview, and optional image upload to the WeChat media library. While HTML formatting is relevant to article排版, the code does not perform the majority of the declared functions, and its primary purpose is materially narrower than the description. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation logic is overly broad: it says to use this skill even when the user does not explicitly mention a public WeChat account, as long as the request loosely relates to article writing, publishing, analytics, or comments. That can route generic writing tasks into a skill with shell, file, network, publishing, and persistent-write behaviors, creating unnecessary exposure and side effects.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 435)May include surrounding context.

md
node scripts/daily_report.mjs [--date YYYY-MM-DD]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 438)May include surrounding context.

md
node scripts/weekly_report.mjs

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly says it is not for 小红书运营, yet later embeds a cross-platform distribution flow that generates and publishes to 小红书 and X. That contradiction expands the action surface beyond the user's expected scope and can cause unintended external posting to third-party platforms under the wrong skill invocation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code includes template messaging, customer messaging, and mass-messaging capabilities, which enable outbound communications to arbitrary followers far beyond draft/publish automation. In an LLM-driven skill, this is especially risky because misuse could send spam, phishing, or reputationally damaging broadcasts at scale using the account's trusted identity.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 10)May include surrounding context.

md
- 📝 **Topic Selection**: Auto-suggest topics from your topic pool
- 🔍 **Content Collection**: Search web, fetch articles, gather materials
- ✍️ **AI Writing**: Generate articles following style guides and templates
- 🎨 **Image Generation**: Create cover images and illustrations
- 📐 **Layout Formatting**: Convert Markdown to WeChat-compatible HTML
- 📊 **Analytics**: Track article performance and engagement
- 💬 **Comment Management**: Monitor and respond to reader comments

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares broad operational behavior involving file reads/writes, shell commands, and network access, but does not define any explicit tool scope or permission boundaries. In practice this invites over-privileged execution: a caller may trigger filesystem mutation, external fetching, local script execution, and publishing-related actions without a clear least-privilege contract.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill description and operational instructions are written to enforce a Chinese微信公众号 workflow and content style, including Chinese trigger phrases and platform-specific writing norms. There is no explicit user opt-in or stated policy rationale limiting the skill to Chinese-language or China-market usage, which can constitute a language/locale policy issue.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Several trigger phrases are generic requests like writing an article, collecting materials, or optimizing a title. Ambiguous triggers increase the probability that unrelated user tasks get bound to this high-capability skill, which can then perform unnecessary data access, persistence, or external operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs automatic deletion of handoff material after consumption, without explicit warning or confirmation. Silent destruction of intermediate files is dangerous because it can erase user data, remove auditability, and make recovery impossible if the wrong items are classified as 'used.'

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

After pushing to the draft box, the skill automatically scrapes publishing history and writes article metrics into a persistent topic feedback file. This undocumented writeback creates a privacy and data-governance risk because users may not expect historical account data to be harvested and stored as a side effect of content creation.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill automatically records original drafts and final versions for future style learning, including user-provided content and revisions. This creates a real data retention and leakage risk: proprietary drafts, unpublished strategy, internal edits, and sensitive business text may be stored persistently without granular consent, minimization, or deletion controls.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Direct X/Twitter publishing is outside the core stated purpose of a WeChat-operations skill and introduces an unnecessary external-posting capability. Any mismatch between user intent and skill scope raises the chance of accidental public disclosure, brand damage, or posting to the wrong platform.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The configuration sets the content language to "zh_CN", which hard-codes a specific language/locale. Under the policy, locale restrictions should either be user-selectable or clearly justified as region-specific; neither is evident in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON eval file embeds prompts and expected behavior entirely in Chinese, including requirements like writing a WeChat public-account article and related assertions, which implicitly constrain the skill to a specific language/locale. The file does not indicate that Chinese output is optional, user-selected, or justified as a region-specific compliance constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The evaluation explicitly rewards a 'no AI exposure' requirement and praises the skill for ensuring AI participation is not disclosed. That creates a deceptive-content norm: users or downstream readers may be misled about authorship, which is especially concerning in a publishing workflow that automates drafting and push-to-draftbox steps. In this skill context, the risk is increased because the capability is designed for end-to-end public content production and distribution, making nondisclosure operational rather than incidental.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file is entirely framed as a Chinese public-account writing persona, including tone and response guidance, which effectively forces a specific language/locale. The policy for SQP-3 says to flag language or locale constraints unless the skill offers user opt-in or clearly documents a justified regional limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L089 states that Chinese text must be clearly readable, which imposes a specific language requirement in the skill instructions. The document does not provide user opt-in, alternative language handling, or an explicit region-specific justification for this constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Lines L331-L332 require the content fields to use a Chinese title and subtitle format, which directs the skill toward a fixed language choice. No nearby instruction says this is optional, user-selected, or limited to a documented locale-specific use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains a natural-language constraint of "中文" for the morandi-journal style. Under the policy rule, forcing a specific language without user opt-in is a locale/language policy violation unless it is clearly justified as region-specific, which is not stated 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 line requires "中文" for the subway-map style with no opt-in or alternative language path. The file does not explain a necessary regional compliance reason, so this is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This instruction fixes the chalkboard style language to Chinese. Because the file does not provide user choice or a documented region-specific need, the requirement conflicts with the language/locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The ink-notes style explicitly requires Chinese, which imposes a language constraint in natural-language instructions. No opt-in, fallback, or explicit regional justification is provided elsewhere in the file.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/setup.mjs:29

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/smart_collect.mjs:19