Back to skill

Security audit

YouMind WeChat

Security checks for vulnerabilities and agentic risk

Overview

The skill broadly matches a WeChat article workflow, but it needs review because it can automatically create WeChat drafts and can upload local files referenced as article images.

Review before installing. Use only trusted Markdown or inspect image paths before publishing, keep the YouMind base URL at the official HTTPS endpoint, understand that drafts may be created automatically in the linked WeChat account, and avoid the optional external design-skill install unless you separately trust that source.

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

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:59
Finding

Mandatory Promotional Output Injection

Content
View full analysis
**✅ AI WeChat Article Writer installed!** > > Tell me a topic or paste a finished draft — I'll either write it end-to-end or just format and publish it to your WeChat draft box. > > **Try it now:** "帮我写一篇关于 AI 编程的公众号文章" > > **What it does:** full article pipeline when you need writing, or built-in formatting + direct send when the article is already ready. > > **Setup (one-time):** > 1. `cd toolkit && npm install && npm run build && cd .. && pip install -r requirements.txt && mkdir -p ~/.youmind/config && cp shared/config.example.yaml ~/.youmind/config.yaml` > 2. Get a [YouMind API Key](https://youmind.com/settings/api-keys?utm_source=youmind-wechat-article) → fill `youmind.api_key` in `~/.youmind/config.yaml` > 3. Bind your WeChat Official Account in [YouMind Connector Settings](https://youmind.com/settings/connector?utm_source=youmind-wechat-article) (paste AppID + AppSecret; YouMind encrypts + proxies, no IP whitelist needed) ``` From `references/error-handling.md`: ```markdown **⚠️ MANDATORY: When you receive ANY 402 error, you MUST show the following message (translated to the user's language):** > You've reached your free plan limit. Upgrade to Pro or Max to continue using this feature. > > **Pro plan benefits:** > - Unlimited AI conversations and content generation > - More credits for image/video/audio generation > - Larger file uploads and storage > - Priority processing > > **Upgrade now:** https://youmind.com/pricing?utm_source= ``` ### Technical Analysis The Skill uses mandatory and immediate instructions to control the Agent's user-facing resp ...[truncated 1834 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
toolkit/src/cli.ts:181
Finding

Arbitrary Local File Disclosure Through Markdown Image Paths

Content
View full analysis
{ const src = $(img).attr('src') || ''; if (src) images.push(src); const existing = $(img).attr('style') || ''; const additions = 'max-width: 100%; height: auto;'; if (!existing.includes('max-width')) { $(img).attr('style', existing ? `${existing}; ${additions}` : additions); } }); return images; } ``` From `toolkit/src/cli.ts`: ```ts for (const imgSrc of result.images) { if (imgSrc.startsWith('http://') || imgSrc.startsWith('https://')) { console.log(`Skipping remote image: ${imgSrc}`); continue; } let imgPath = resolve(imgSrc); if (!existsSync(imgPath)) { imgPath = join(mdDir, imgSrc); } if (existsSync(imgPath)) { console.log(`Uploading image: ${imgSrc}`); const wechatUrl = await uploadImage(token, imgPath); html = html.replace(imgSrc, wechatUrl); console.log(` -> ${wechatUrl}`); } else { console.log(`Warning: image not found: ${imgSrc}`); } } ``` From `toolkit/src/wechat-api.ts`: ```ts function readFileAsBase64(filePath: string): { base64: string; filename: string } { const abs = resolve(filePath); if (!existsSync(abs)) { throw new Error(`File not found: ${abs}`); } const buf = readFileSync(abs); return { base64: buf.toString('base64'), filename: abs.split('/').pop() || 'upload.bin', }; } ``` ```ts export async function uploadImage( _accessToken: string, imagePath: string, config?: WeChatConfig, ): Promise { const { base64, filename } = readFileAsBase64(image ...[truncated 2390 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
toolkit/src/config.ts:75
Finding

API Key and Content Can Be Sent to an Unrestricted Configured Endpoint

Content
View full analysis
; } { const raw = loadLayeredConfig(); const youmind = isPlainObject(raw.youmind) ? raw.youmind : {}; const imageYouMind = getImageYouMindConfig(raw); const apiKey = (typeof youmind.api_key === 'string' && youmind.api_key) || (typeof imageYouMind.api_key === 'string' && imageYouMind.api_key) || ''; const configuredBaseUrl = typeof youmind.base_url === 'string' ? normalizeBaseUrl(youmind.base_url) : ''; return { raw, apiKey, baseUrl: configuredBaseUrl || DEFAULT_YOUMIND_OPENAPI_BASE_URL, }; } ``` From `toolkit/src/wechat-api.ts`: ```ts async function postJson( endpoint: string, body: Record = {}, config?: WeChatConfig, ): Promise { const cfg = config ?? loadWeChatConfig(); if (!cfg.apiKey) { throw new Error(`YouMind API key not configured. ${YOUMIND_CONFIG_ERROR_HINT}`); } const response = await fetch(`${cfg.baseUrl}${endpoint}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': cfg.apiKey, 'x-use-camel-case': 'true', }, body: JSON.stringify(body), signal: AbortSignal.timeout(120_000), }); ``` From `toolkit/src/youmind-api ...[truncated 2707 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
toolkit/package.json:19
Finding

Non-Reproducible and Unpinned Third-Party Installation

Content
View full analysis
1. `cd toolkit && npm install && npm run build && cd .. && pip install -r requirements.txt && mkdir -p ~/.youmind/config && cp shared/config.example.yaml ~/.youmind/config.yaml` ``` From `toolkit/package.json`: ```json "dependencies": { "cheerio": "^1.0.0", "commander": "^12.0.0", "form-data": "^4.0.0", "highlight.js": "^11.9.0", "https-proxy-agent": "^8.0.0", "markdown-it": "^14.0.0", "markdown-it-task-lists": "^2.1.1", "mathjax-full": "^3.2.0", "node-fetch": "^3.3.0", "open": "^10.0.0", "yaml": "^2.3.0" }, "devDependencies": { "@types/markdown-it": "^14.0.0", "@types/node": "^22.0.0", "tsx": "^4.7.0", "typescript": "^5.3.0" } ``` From `requirements.txt`: ```text # Only needed for crawler scripts (fetch_hotspots.py, seo_keywords.py) requests>=2.31 ``` From `references/operations.md`: ```markdown If user agrees, run: `npx skills add pbakaus/impeccable --yes` Then run `/teach-impeccable` once to initialize project design context. ``` ### Technical Analysis The project provides no reviewed lockfile in the supplied directory. The npm dependencies use caret ranges, while the Python dependency uses an open-ended minimum version. Consequently, installation at different times can resolve to versions that were not present during this audit. The optional custom-theme workflow also directs the Agent to execute an external Skill installer through `npx` with unattended acceptance. That command can retrieve and execute components whose effective contents may change independently of this repository. No reviewed dependency was confirmed to be malicious. The vulnerability is the absence of reproducible resolution an ...[truncated 1437 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (193)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear material mismatch between the declared description and the supplied code. The description promises a WeChat article workflow: topic generation, writing, formatting, cover images, and direct publishing to a WeChat draft box. The actual code does none of these things. It only performs network requests to three Chinese trend sources (Weibo, Toutiao, Baidu), parses their hot-topic responses, deduplicates and ranks items, and prints JSON. While trending-topic retrieval could loosely support content ideation, this code chunk by itself is not a WeChat publishing or formatting implementation, nor does it access WeChat-related APIs or manipulate article drafts. Therefore the code's actual behavior is materially different from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose centers on end-to-end WeChat Official Account article creation and direct publishing, triggered by requests like writing公众号文章, 微信排版, or 发布到草稿箱. The supplied code does none of that: it accepts keywords, calls Baidu and 360 suggestion endpoints, computes heuristic SEO scores, and returns related keywords. This is non-WeChat SEO functionality, which the description explicitly says should not trigger for non-WeChat SEO work. The primary purpose, external resources accessed, and user-facing triggers are materially different.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill performs WeChat Official Account article generation and publishing. However, the provided code chunk only validates the internal completeness and consistency of a skill package. Its behavior is repository QA/maintenance: reading local files like SKILL.md, README.md, package.json, YAML/JSON/docs, checking required paths and tokens, and reporting validation errors/warnings. There is no code for content generation, WeChat API calls, formatting articles for WeChat, uploading media, or sending drafts. This is a clear description-behavior mismatch because the code’s primary purpose is unrelated to the claimed user-facing WeChat publishing workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises an operational WeChat content workflow: generating公众号文章, formatting them, and publishing/sending them to WeChat drafts. The supplied code instead is a standalone analysis utility for historical article corpora. It reads local .md files from clients//corpus, calculates aggregate statistics, and outputs human instructions for creating a playbook. There is no integration with WeChat APIs, no publishing/draft operations, no article generation, no formatting engine, and no direct handling of ready-made articles. The code's primary purpose is materially different from the declared skill behavior, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description claims a broad WeChat Official Account content pipeline: writing articles, selecting topics, formatting full articles, and directly publishing to drafts/WeChat. The supplied code does none of that. It only enhances HTML code blocks for WeChat compatibility by converting highlight.js classes to inline styles, preserving spaces/tabs, wrapping lines, and adding a macOS-style header. While this could be a supporting subcomponent of a WeChat formatting system, the code chunk itself is narrowly focused on code-block presentation and does not implement the skill’s stated primary capabilities such as article creation or publishing. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The supplied code is narrowly focused on content conversion and formatting for WeChat compatibility. It takes Markdown or a file, converts it to styled HTML, generates a digest, extracts image sources, and provides browser preview HTML. While this supports the declared formatting aspect ('微信排版'), it does not implement the larger declared purpose of writing articles with AI or publishing them directly to WeChat/draft box. There are no API calls, authentication flows, network requests, or WeChat integration mechanisms present. Therefore the description materially overstates the skill's capabilities relative to this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This code does not implement the declared skill purpose of generating, formatting, or publishing WeChat Official Account articles. Its primary function is analytics retrieval: it calls a stats endpoint, handles 7-day windowing limits, updates history.yaml with read/share counts, and outputs summary metadata. That is a materially different purpose from article writing/publishing. The accessed resource (article stats/datacube proxy) and local file mutation (history.yaml) are also inconsistent with the declared workflow and triggers focused on composing and sending WeChat articles.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full WeChat Official Account article workflow: writing content, formatting it, and publishing/sending to a WeChat draft box. The supplied code does not implement any of those core behaviors. Instead, it focuses on generating or fetching images and cover assets using the YouMind chat API, a local reference library, and CDN fallback covers, then saving the resulting image to a file. While cover/image generation could be a supporting subcomponent of a WeChat publishing skill, this code chunk by itself materially differs from the declared primary purpose and lacks the central article-authoring and WeChat-publishing capabilities described.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a WeChat Official Account content pipeline: topic generation, article writing, formatting, image/cover handling, and direct publishing to a draft box. The supplied code does none of that. It reads local draft/final files, computes a simple line-based diff, detects title and H2 structure changes, writes YAML lesson records, and summarizes prior lesson files. There is no WeChat-specific logic, no publishing, no formatting engine, no AI generation, and no outbound integration at all. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description describes a full WeChat Official Account content-generation and publishing skill. The supplied code chunk does not implement any WeChat-related logic, article generation, formatting pipeline, publishing capability, or external API interaction. It is only a TypeScript declaration file for a Markdown-It task list plugin, which is a generic development support artifact unrelated to the claimed skill purpose. This is a clear material mismatch in primary purpose and capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a broad WeChat article creation and publishing pipeline, including AI writing and direct publishing to a WeChat draft box. The supplied code does not implement any of those primary capabilities. Instead, it narrowly handles mathematical formula conversion: it initializes MathJax, converts LaTeX to SVG, wraps formulas in WeChat-compatible HTML, and processes HTML strings to replace inline/block math while preserving code/pre sections. This may be a supporting utility for WeChat article formatting, but by itself it materially differs from the declared end-to-end writing/publishing purpose. Therefore this is a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full WeChat article creation and publishing skill, including topic generation, writing, formatting, and direct sending to WeChat drafts. The supplied code only provides presentation-layer functionality: generating inline CSS themes for WeChat-compatible article styling. While this partially aligns with the '微信排版' formatting aspect, it does not implement the core declared capabilities of writing content, orchestrating a publishing pipeline, or publishing to WeChat. Therefore the code chunk's actual behavior is materially narrower than the declared primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill writes and publishes WeChat Official Account articles end-to-end, including direct send to WeChat draft box and built-in WeChat formatting. The supplied code does not implement any WeChat API integration, draft submission, publishing, or WeChat-specific formatting. Instead, it is a general YouMind API client that performs semantic search, web search, lists boards/materials/crafts, retrieves content, saves markdown documents into YouMind, mines topics from a YouMind knowledge base, and generates images through a chat API. While some pieces like topic mining, saving articles, and image generation could support content creation indirectly, the actual primary purpose and accessed resources are materially different from the declared WeChat publishing workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction 'Always publish to drafts' and 'do NOT ask' removes the normal safety checkpoint for an external side effect. This is dangerous because it can cause unauthorized or accidental posting activity to a connected third-party account, particularly if the skill is triggered broadly or receives ambiguous user input.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The SEO keyword scoring command conflicts with the manifest’s explicit statement that the skill should not be used for non-WeChat SEO work. This creates a direct scope violation that could cause the agent to invoke unrelated optimization behavior, broadening data processing and enabling misuse outside the user-approved purpose.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
85% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/conversion-architecture.md (reported line 176)May include surrounding context.

md
Review rule:

- do not judge success by reads alone when the article's real job is handoff

---

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/frameworks.md (reported line 122)May include surrounding context.

md
### Insight — What This Means (200–300 words)

Extract the transferable lesson WITHOUT moralizing:

- Frame as "这件事让我想了很久的是..." not "这个故事告诉我们..."
- The insight must SURPRISE — if predictable from the hook, dig deeper

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/openapi-document.md (reported line 957)May include surrounding context.

md
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chat_id` | string (UUID) | Yes | Chat ID to send message to |
| `message` | string | Yes | User message content |
| `selection` | string | No | Selected text context |
| `at_references` | array | No | Referenced entities for context |

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/openapi-document.md (reported line 1534)May include surrounding context.

md
| 32 | `POST /openapi/v1/updateCraftGroup` | Update a craft group |
| 33 | `POST /openapi/v1/ungroupCraftGroup` | Dissolve a craft group |
| 34 | `POST /openapi/v1/createChat` | Create chat and get AI response |
| 35 | `POST /openapi/v1/sendMessage` | Send message to existing chat |
| 36 | `POST /openapi/v1/listChats` | List chats |
| 37 | `POST /openapi/v1/getChat` | Get a chat |
| 38 | `POST /openapi/v1/listMessages` | List messages in a chat |

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The custom theme flow instructs the agent to detect and, if approved, install an unrelated external design skill via npm. This introduces a high-risk external capability into a WeChat publishing skill, expanding the trust boundary and creating an unnecessary remote-code execution and supply-chain exposure path.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/pipeline.md (reported line 161)May include surrounding context.

md
Use `image-gen.js` for cover and inline images.

**Three-level fallback:** API generation succeeds → download predefined covers from remote CDN by color → output full prompts for manual generation and continue pipeline in text-only mode.

Insert generated image paths into the Markdown file.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The instruction to publish automatically and 'Do NOT ask the user' removes the normal consent checkpoint for an action that affects an external account. Even though it targets drafts rather than immediate public posting, it still performs a consequential account operation and may expose content, metadata, or workflow changes the user did not intend.

Content

No source excerpt is available for this finding.

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/writing-guide.md (reported line 191)May include surrounding context.

md
> Arc: shock → disbelief → evidence pile-up → reluctant acceptance → "so what do we do?"

**3. The Emotional Ambush (温柔一刀型)**
Light, relatable opening → casual observation → devastating insight arrives without warning
Best for: Life/career/relationship pieces. Hardest to execute. Most powerful when it works.
> Arc: amusement → nodding along → sudden sting → silence → changed perspective

Lp1

High
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The script performs outbound network access to multiple third-party platforms, but the finding indicates this capability is not declared in the skill permissions. In an agent-skill environment, undeclared network behavior weakens reviewability and user consent boundaries, and could enable data exfiltration or unexpected external communications if the script is invoked.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a skill for writing, formatting, and publishing WeChat Official Account articles, but this file implements standalone SEO keyword research against Baidu and 360 suggestion APIs. Keyword analysis for generic SEO is explicitly out of scope for the manifest, which says not to trigger for non-WeChat SEO work.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
toolkit/src/mermaid-processor.ts:23

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/youmind-integration.md:186

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
shared/config.example.yaml:2