Back to skill

Security audit

Wechat Article Export

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent WeChat article export purpose, but it needs Review because it processes remote content with overly broad network fetching, disabled browser sandboxing, and weak dependency controls.

Install only if you are comfortable running a browser-based exporter on remote WeChat articles. Prefer a sandboxed/containerized environment with restricted network egress, use --no-images unless you need local image copies, review exported files before sharing them, and pin dependencies before production use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/wechat_export.py:735
Finding

Unrestricted article-controlled image fetching enables server-side request forgery

Content
View full analysis
100: return url, str(path) with open(path, "wb") as f: for ...[truncated 2647 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/wechat_export.py:758
Finding

Remote image downloads have no file-size or aggregate resource limits

Content
View full analysis
100: return url, str(path) with open(path, "wb") as f: for chunk in resp.iter_content(8192): if chunk: f.write(chunk) ``` ### Technical Analysis The downloader streams each response to disk until the remote server terminates the response. It does not enforce: - A maximum size per downloaded file. - A maximum aggregate size per export. - A maximum number of article images. - A validated image content type or file signature. - A bounded response-body duration separate from socket-level timeout behavior. Up to five downloads run concurrently, and failed operations may be retried. An attacker-controlled article can therefore reference large responses or endpoints that continuously stream data, causing excessive disk, network, and execution-time consumption. The screenshot and PDF paths also construct a full-page image in memory, so abnormally large rendered pages can increase memory pressure, although the directly evidenced issue here is the unbounded download loop. ### Attack Path 1. An attacker creates an article containing many image references or references to endpoints serving extremely large or indefinitely streamed bodies. 2. A user exports the article with the default image-download option enabled. 3. The Skill starts up to five concurrent downloads. 4. Each response is written without a byte limit, and failed downloads may be retried. 5. The host consumes excessive disk s ...[truncated 643 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/wechat_export.py:174
Finding

Chromium sandbox is disabled while processing remote article content

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:109
Finding

Installation instructions use unpinned third-party packages and browser artifacts

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Lp1

High
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The script performs multiple outbound network operations via Playwright and requests to fetch article HTML and download remote images, but the finding indicates this capability is not declared in the skill permissions. In an agent/skill environment, undeclared network access weakens user and platform trust boundaries because the skill can contact external hosts and transfer data without explicit permission disclosure.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/wechat_export.py (reported line 201)May include surrounding context.

python
"--metrics-recording-only",
                    "--no-first-run", "--no-default-browser-check",
                    "--safebrowsing-disable-auto-update",
                    "--use-mock-keychain",
                    "--hide-scrollbars", "--mute-audio",
                    "--disable-extensions",
                    "--disable-features=TranslateUI",

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrase "微信导出" is broad enough to match many ordinary WeChat-related requests that may not be specifically about exporting public WeChat articles. Over-broad triggers can cause the agent to activate this skill in the wrong context, increasing the chance of unintended URL handling, file writes, or content processing without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation rule "收到 mp.weixin.qq.com 連結" is ambiguous because it allows the skill to trigger on any matching link without confirming user intent, article scope, or whether the link is actually a supported public article. This can cause unexpected processing of unrequested content and expands the skill's activation surface beyond its stated purpose.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The browser context is configured with anti-detection flags and JavaScript that masks automation indicators such as navigator.webdriver, plugins, languages, chrome objects, and permissions behavior. This goes beyond normal rendering for export and is dangerous because it deliberately circumvents anti-bot controls of the target site, enabling stealthier automated access and increasing abuse potential.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The browser context is hard-coded to use zh-CN, and related headers elsewhere also enforce Chinese language preferences. This creates a language/locale policy issue because the skill does not offer the user any choice or document this as a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The code creates an images directory and later writes downloaded images and markdown output to disk. Although the CLI mentions an output directory, there is no clear warning in the top-level description/docstring that the tool will persist fetched remote content and generated files locally.

Content

No source excerpt is available for this finding.