T09 · Insecure Skill Coding Practices
- Location
server.py:57- Finding
Private WeChat Content Persisted in Unprotected Screenshot Files
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears intended for WeChat desktop automation, but it can send real messages and leave private chat screenshots and clipboard contents behind without enough user control or disclosure.
Install only if you are comfortable granting an agent control over your local WeChat window. Review or modify the skill so it asks for explicit confirmation before sending, requires an exact recipient, avoids saving screenshots during normal use, restores the clipboard after pasting, and limits diagnostics to WeChat-only windows.
server.py:57Private WeChat Content Persisted in Unprotected Screenshot Files
server.py:143Outgoing Message Content Remains in the Global System Clipboard
find_windows.py:3Diagnostic Utility Enumerates All Visible Desktop Windows
requirements.txt:1Dependencies Are Installed Without Reproducible Version and Integrity Controls
If the skill performs OCR/contact-name recognition and local screenshot capture rather than the stated message-monitoring/sending workflow, the documentation creates a misleading trust boundary. Misrepresentation of capabilities is dangerous because users may expose chat sessions or approve automation without understanding that image capture and recognition are occurring.
If the skill performs OCR/contact-name recognition and local screenshot capture rather than the stated message-monitoring/sending workflow, the documentation creates a misleading trust boundary. Misrepresentation of capabilities is dangerous because users may expose chat sessions or approve automation without understanding that image capture and recognition are occurring.
If the skill performs OCR/contact-name recognition and local screenshot capture rather than the stated message-monitoring/sending workflow, the documentation creates a misleading trust boundary. Misrepresentation of capabilities is dangerous because users may expose chat sessions or approve automation without understanding that image capture and recognition are occurring.
If the skill performs OCR/contact-name recognition and local screenshot capture rather than the stated message-monitoring/sending workflow, the documentation creates a misleading trust boundary. Misrepresentation of capabilities is dangerous because users may expose chat sessions or approve automation without understanding that image capture and recognition are occurring.
The tool sends the message by pressing Enter without an explicit confirmation immediately before the irreversible action. Because it relies on GUI focus and weak window identification, a small targeting error can result in unintended transmission to the wrong contact, making the operational context especially risky.
The usage examples encourage automated message sending but do not prominently warn that GUI automation can target the wrong conversation if window focus, title parsing, or contact detection is incorrect. In a messaging context, misdelivery can leak sensitive information to unintended recipients and trigger irreversible outbound communication.
The MCP tool definition exposes a live message-sending action without clearly stating that it activates the WeChat window and sends to the current chat context. In agentic use, that omission is risky because tool consumers may treat it like a sandboxed API rather than real GUI automation capable of sending unintended real-world messages.
The helper includes a capability to capture a large portion of the WeChat window via ImageGrab.grab, which can collect full chat history and other on-screen sensitive content unrelated to sending an auto-reply. In a desktop automation skill, this expands the trust boundary significantly and creates privacy and unauthorized collection risks even if the image is only intended for local use.
The code captures the current WeChat chat area and persists it to disk as last_chat.png, which collects message content beyond the stated functionality of monitoring and sending replies. Persisting screenshots creates a local data exposure risk because chat contents may include sensitive personal or business information and the file can be accessed later by other users, processes, backups, or forensic tools.
Writing chat screenshots to disk without any notice or consent silently creates a recoverable record of private conversations. This increases the chance of accidental disclosure through shared machines, malware, cloud sync, logs, backups, or subsequent misuse by other components.
The code enumerates every visible top-level window on the desktop and prints each window's title, size, and position, without restricting collection to WeChat. Window titles can contain sensitive information such as document names, chat subjects, email subjects, or application context, so this creates unnecessary desktop-wide information disclosure beyond the stated skill purpose.
The code captures and persists screenshots of the WeChat contact-name area and full chat window to local files, which exceeds the stated purpose of merely monitoring/sending messages. Those images can contain sensitive conversation content, contact identities, and other desktop information, creating unnecessary local data exposure and retention risk.
Clipboard-based insertion occurs automatically with no user-facing warning or approval, so the tool can silently replace clipboard contents and stage text into the active chat. In desktop automation, that creates a safety and privacy issue because the user may not realize a global OS resource has been modified.
When no contact is provided, the tool falls back to auto-detecting or using the current chat window, which can cause messages to be sent to an unintended recipient. In a GUI-automation context, window focus and title detection are brittle, so this behavior materially increases the chance of misdelivery of sensitive or harmful messages.
The script captures a portion of the WeChat window and saves it to a predictable local file without explicit consent, notice, or any protection for the captured content. In the context of a skill designed to monitor and send WeChat messages, this can expose private contact names or message-related UI data to disk where other local users, tools, or later processes may access it.
The dependency is specified with a lower-bound only, which permits installation of any newer release and makes builds non-reproducible. In a security-sensitive automation skill that controls a desktop messaging client, this increases supply-chain risk because a compromised or vulnerable future release could be pulled without review.
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
Using pygetwindow>=0.0.9 leaves the installed version unconstrained above the minimum, so dependency resolution may select unreviewed releases. This is a supply-chain hygiene weakness and is more concerning here because the skill interacts with local application windows on a Windows desktop.
pyautogui>=0.9.54
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
The unpinned pytesseract dependency allows arbitrary newer versions to be installed, preventing reproducible and reviewable builds. While not an immediate exploit by itself, it creates exposure to future malicious or vulnerable releases in the dependency chain.
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
Pillow>=12.1.0 is not pinned, so the environment may install any later version, including one with newly introduced flaws or a compromised release. This is more dangerous than a generic library here because image parsing libraries often process untrusted content and Pillow has a history of security advisories.
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
The manifest does not pin Pillow, and the package has multiple known advisories across versions, so it is impossible to verify whether deployments are using an affected release. Given that Pillow is an image-processing library and this skill appears to use OCR/screen automation, vulnerable image handling could increase the chance of denial of service or worse depending on the specific version.
pyperclip>=1.11.0 permits unreviewed newer versions and makes builds non-deterministic. In this skill, clipboard access is part of the automation surface, so dependency integrity matters even if the manifest issue itself is a low-severity supply-chain weakness.
pygetwindow>=0.0.9
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0
opencv-python>=4.13.0 leaves the installed version open-ended, which can result in pulling vulnerable or malicious future releases. This is particularly relevant because OpenCV is a complex native package with a substantial historical vulnerability surface and may process image data in the automation workflow.
pytesseract>=0.3.13
Pillow>=12.1.0
pyperclip>=1.11.0
opencv-python>=4.13.0
Because opencv-python is unpinned and the package has many known advisories, the actual security posture cannot be determined from this manifest. In a desktop automation skill using OCR/computer vision, an affected OpenCV build could expose the host to parser or memory-safety issues when handling crafted image inputs.
The skill copies the outgoing message into the system clipboard, affecting a shared OS resource not disclosed by the high-level tool description. This can overwrite user clipboard contents and briefly expose sensitive text to other applications or clipboard monitors on the host.
The docstring and window lookup rely on the Chinese application name '微信', which assumes a specific locale and client language. This creates a language/locale constraint without user opt-in or documented justification.
No suspicious patterns detected.