Back to skill

Security audit

给微信的联系人或者群发送信息

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says by automating WeChat messages, but it can send messages immediately through fragile desktop automation without enough confirmation or focus checks.

Review this carefully before installing. It can control the active desktop session, use the clipboard, and send WeChat messages as you. Only use it in a controlled Windows session with WeChat visible, avoid sensitive message bodies in batch mode, and prefer a version that adds recipient verification, preview/confirmation before Enter, failsafe enabled, scoped queue storage, clipboard cleanup, and pinned dependencies.

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

T09 · Insecure Skill Coding Practices

Error
Location
server.py:15
Finding

Unverified UI Focus Can Send Messages to an Unintended Application or Recipient

Content
View full analysis
500 and w.width < 2000: print("WeChat window is open") return True time.sleep(0.5) return False ``` ```python def search_contact(contact_name): pyautogui.hotkey('ctrl', 'f') time.sleep(0.3) pyautogui.hotkey('ctrl', 'a') time.sleep(0.1) pyautogui.press('delete') time.sleep(0.1) pyperclip.copy(contact_name) pyautogui.hotkey('ctrl', 'v') time.sleep(0.5) pyautogui.press('enter') time.sleep(0.5) print(f"Opened contact: {contact_name}") return True, None ``` ```python open_wechat() time.sleep(0.5) success, err = search_contact(contact_name) if not success: return False, err time.sleep(0.5) pyperclip.copy(message) time.sleep(0.2) pyautogui.hotkey('ctrl', 'v') time.sleep(0.3) pyautogui.press('enter') ``` ### Technical Analysis The automation performs global keyboard input without establishing that WeChat is still the foreground application. Although `open_wechat()` can return `False`, its return value is ignored by the message-sending path. The code then proceeds to issue search, paste, and Enter keystrokes regardless of the active window. `search_contact()` also returns success unconditionally. It does not verify that the search interface opened, that an exact contact was selected, or that the resulting chat belongs to the requested recipient. Window matching is based only on title and bro ...[truncated 1734 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
server.py:65
Finding

Recipients and Message Contents Are Retained in Plaintext Files and the System Clipboard

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Open-Ended and Unnecessary Third-Party Dependencies Create Supply-Chain Exposure

Content
View full analysis
=0.9.54 pygetwindow>=0.0.9 pytesseract>=0.3.13 Pillow>=12.1.0 pyperclip>=1.11.0 opencv-python>=4.13.0 ``` The installation instructions in `SKILL.md` also install packages without exact versions: ```bash pip install pyautogui pygetwindow pillow pyperclip ``` ### Technical Analysis Every requirement uses an open-ended lower bound, allowing package managers to install any future release satisfying the constraint. No lock file, integrity hash, or reviewed transitive dependency set is provided. As a result, two installations at different times can resolve to materially different code. `pytesseract` and `opencv-python` are not imported or used by the reviewed source files, increasing the dependency and transitive-dependency surface without providing an observed runtime function. The dependency set in `SKILL.md` also differs from `requirements.txt`, which undermines reproducibility and makes it unclear which environment was reviewed. This finding does not demonstrate that any currently named package is malicious. The risk arises from unrestricted future resolution, unnecessary packages, and the absence of integrity controls. ### Attack Path 1. A user installs the skill dependencies from a package index using `requirements.txt` or the documented `pip install` command. 2. Dependency resolution selects a later package or transitive dependency that was not part of the audited project. 3. If that release is compromised, malicious, or sourced from an untrusted package index, its installation or import-time code executes under the installing user's privileges. 4. Because no hashes or lock file are present, the installer has no project-supplied integrity value with which to reject the unexpected artifact. ### Impact Assessment A compromise ...[truncated 489 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The declared description understates the actual behavior by omitting bulk/queued sending, persistent queue storage, resumable sending, and test-mode redirection. This mismatch is dangerous because users and agent frameworks may authorize a simple single-recipient action while the implementation can automate multi-recipient outreach and retain state across runs, increasing spam, misdelivery, and abuse risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description understates the actual behavior by omitting bulk/queued sending, persistent queue storage, resumable sending, and test-mode redirection. This mismatch is dangerous because users and agent frameworks may authorize a simple single-recipient action while the implementation can automate multi-recipient outreach and retain state across runs, increasing spam, misdelivery, and abuse risk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
79% confidence
Finding

The skill documentation declares no explicit tool scope or permissions despite behavior implying file read/write capability, including persistence via a queue file. Missing scope boundaries increases the risk that an agent or reviewer underestimates what the skill can access or modify, which matters more because the skill automates message sending and stores state on disk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases include ordinary language like '微信发送' and '发微信', which may overlap with normal conversational text and accidentally invoke an action that sends messages. In this skill, accidental activation is more dangerous than usual because it can drive GUI automation and potentially send to multiple recipients with little friction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill advertises bulk automated message sending without prominently warning about risks such as accidental spam, wrong-recipient delivery, policy violations, or unattended GUI misfires. Given that the workflow uses keyboard simulation and supports batch operation, lack of warning and safety friction materially raises the chance of harmful misuse or user error.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The top-level documentation says "每次只发送给一个人" and shows a usage example with multiple contacts, creating an active contradiction with the actual implementation. The code parses a contact list, stores a queue, and repeatedly advances through multiple recipients via --next, so the documented intent does not match runtime behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring presents usage instructions only in Chinese, and the rest of the script's user-facing prompts follow the same pattern. Under the policy, forcing a specific language without opt-in or justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool sends WeChat messages immediately after receiving a tool call, with no confirmation, preview, allowlist, or interactive consent step. Because it uses GUI automation and synthetic keystrokes, a mistaken invocation, prompt-injected command, or wrong window focus could transmit unintended content to a real contact without the user's final approval.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
81% confidence
Finding

The short trigger 'wt' is prone to accidental matches or ambiguous invocation, especially in chatty environments or shorthand-heavy workflows. While low severity by itself, the risk is amplified here because invocation can lead to automated message transmission rather than a read-only action.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The dependency is specified with a lower-bound version only, which permits installation of many different releases over time and makes builds non-reproducible. This increases supply-chain risk because vulnerable or incompatible versions could be resolved without review, especially in a desktop automation skill that interacts with the user environment.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

Using an unpinned pygetwindow dependency allows different versions to be installed in different environments, reducing reproducibility and making security posture unverifiable. In a Windows GUI automation skill, unexpected dependency drift can affect window targeting behavior and widen supply-chain exposure.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The pytesseract package is not version-pinned, so future installs may pull different releases than the author tested. This creates a low but real supply-chain and maintenance risk because vulnerable or breaking versions cannot be ruled out from the manifest alone.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

Pillow is unpinned despite a history of security advisories, so the manifest does not guarantee installation of a reviewed safe release. Because this skill also processes images/OCR-related inputs, dependency uncertainty around an image library is more relevant than in a generic tool.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0

Unverifiable Dependency: Pillow has 16 known advisory(ies) (CVE-2016-2533 (Pillow buffer overflow in ImagingPcdDecode); CVE-2023-50447 (Arbitrary Code Execution in Pillow); CVE-2021-27922 (Pillow Uncontrolled Resource Consumption) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Pillow has multiple known advisories, and because the requirement is not pinned, it is impossible to verify from this manifest whether a vulnerable version may be installed. This is particularly relevant here because the skill includes OCR/image-processing functionality, which may parse attacker-influenced images and increase exposure to image-library flaws.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The pyperclip dependency is specified as a minimum version only, which allows uncontrolled version drift between installations. While the direct impact is limited, unpinned dependencies still weaken build integrity and complicate vulnerability management.

Content

Scanner excerpt · requirements.txt (reported line 5)May include surrounding context.

text
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

opencv-python is unpinned, so the installed version may vary and could include releases with known vulnerabilities or unstable behavior. Since this skill depends on OCR/image handling in a desktop context, uncertainty in a large native-code package like OpenCV raises supply-chain and memory-safety concern more than a pure-Python utility would.

Content

Scanner excerpt · requirements.txt (reported line 6)May include surrounding context.

text
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0

Unverifiable Dependency: opencv-python has 16 known advisory(ies) (CVE-2017-12864 (Integer Overflow or Wraparound in OpenCV); CVE-2017-12598 (Out-of-bounds Read in OpenCV ); CVE-2019-14493 (NULL Pointer Dereference in OpenCV.) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

opencv-python has numerous historical advisories, but the current manifest does not identify which version will be installed, so exposure cannot be assessed reliably. Because OpenCV is a large native extension commonly associated with memory-safety issues, leaving it unpinned in an image-processing workflow creates avoidable supply-chain uncertainty.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings throughout the file, including comments, tool descriptions, status messages, and error text, are written only in Chinese. This imposes a locale/language choice on all users without offering any selection or documenting that the skill is intended exclusively for a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.