Back to skill

Security audit

wxwork-rpa

Security checks for vulnerabilities and agentic risk

Overview

This skill automates Enterprise WeChat messaging and needs Review because it can transmit chat history to arbitrary AI endpoints while its privacy text claims no network upload.

Install only if you are comfortable granting the tool control over the desktop session and exposing Enterprise WeChat message content to the configured AI endpoint. Before use, review the endpoint, avoid command-line API keys, expect local logs to contain sensitive data, and do not use the anti-detection or bulk/continuous messaging behavior in environments with compliance or platform-policy constraints.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/wechat.py:2505
Finding

Enterprise chat content and contact identities are transmitted to an unrestricted endpoint

Content
View full analysis
List[Dict[str, Any]]: try: headers = { "Content-Type": "application/json", "Authorization": f"Bearer {api_key}" } data = { "model": model, "messages": customer_messages, "stream": False, "temperature": 0.7, "max_tokens": 1000 } data["user_id"] = None data["user_name"] = contact_name response = requests.post( api_url, json=data, headers=headers, timeout=30 ) ``` The data flow is invoked after chat messages are extracted: ```python ai_replies = self._call_ai_api( current_chat_name, chat_data, api_url, api_key, model ) ``` ### Technical Analysis The request body contains the extracted conversation in `messages` and the contact identity in `user_name`. The destination is supplied through `api_url` without a hostname allowlist, scheme restriction, destination validation, or user confirmation immediately before disclosure. Network transmission is necessary for the optional AI-reply feature, but unrestricted transmission is not the minimum privilege required. A secure implementation could constrain requests to explicitly trusted HTTPS endpoints and minimize or redact the data sent. The behavior also conflicts with the privacy statement in `SKILL.md:211-214`, which says that operations remain local and no data is uploaded. Users may therefore enable the feature without informed consent to the actual disclo ...[truncated 1092 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/wechat.py:2520
Finding

API credentials can leak through command-line arguments, output, and plaintext transport

Content
View full analysis
Remediation
View remediation

other

Error
Location
scripts/anti_detection.py:18
Finding

Normal automation paths actively implement behavioral detection evasion

Content
View full analysis
bool: current_time = time.time() if current_time - self.last_pattern_change > random.randint(1800, 3600): return True recent_activities = self._get_recent_activities(minutes=5) if len(recent_activities) > 50: return True return False ``` ```python pattern_config = self.anti_detection.get_pattern_config() move_duration = self.anti_detection.add_random_variation(move_duration) self.hardware_sim.simulate_mouse_move(x, y, move_duration) click_delay = pattern_config['click_delay'] time.sleep(self.anti_detection.get_safe_delay(click_delay)) ``` ```python if self.anti_detection.should_change_pattern(): new_pattern = self.anti_detection.get_next_pattern() self.current_behavior_mode = new_pattern typed_text = self.behavior_sim.simulate_typing_with_errors( text, pattern=self.current_behavior_mode ) self.hardware_sim.simulate_keyboard_input( typed_text, min_delay=min_delay, max_delay=max_delay ) ``` ### Technical Analysis The anti-detection modules are not unused utilities. They are invoked by standard click and typing functions. The code: - Randomizes click and typing timing. - Changes behavior patterns periodically and in response to activity volume. - Generates behavioral fingerprints. - Introduces deliberate typing mistakes and corrections. - Adds mouse jitter, hesitation, and human-like trajectories. - Records activity patterns for later behavioral variation. Random delays can sometimes improve UI reliability, but fingerprints, deliberate errors, pattern switching, and explicit anti-detection logic are not necessary for reliable Enterprise WeChat automation. Their purpose is to make automated ac ...[truncated 1118 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/hardware_simulator.py:31
Finding

Automatic HID enumeration and low-level system-wide input injection exceed least privilege

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/wechat.py:53
Finding

Sensitive contacts and message bodies are retained in plaintext logs and command output

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:16
Finding

Unpinned and incomplete dependency installation instructions create supply-chain exposure

Content
View full analysis
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (34)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documented automatic reply workflow integrates with a custom AI API, which necessarily implies sending chat content off-host, yet the skill later asserts that no data is uploaded to the network. In the context of enterprise WeChat automation and chat-history extraction, this inconsistency is dangerous because users may unknowingly route potentially sensitive corporate messages to external systems.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill claims in its privacy/security section that 'all operations are completed locally' and that no data is uploaded to the network, but elsewhere documents an auto-reply feature that requires an external AI API. This can mislead users into exposing chat contents, contact data, or sensitive business communications to a third-party service under false privacy assumptions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This module is explicitly designed for anti-detection, behavior randomization, and human-like disguise, including pattern switching, fingerprint generation, randomized delays, and simulated mistakes. In the absence of any legitimate declared purpose, these capabilities strongly indicate an attempt to evade monitoring or abuse detection systems, which materially increases the ability of an automated agent to conceal unauthorized activity.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The module presents itself as a desktop automation tool, but it also contains autonomous polling and AI-driven replying behavior. That mismatch is dangerous because operators may grant trust and permissions for simple UI automation without realizing the tool can continuously monitor conversations and act on their behalf.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The advertised feature list omits that chat content is sent to an external AI endpoint. This creates a transparency and consent failure around sensitive communications, increasing the chance of unintentional privacy breaches and unsafe deployment.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This duplicate finding points to the same risky pattern: shell-enabled process creation for launching the desktop client. The main issue is unnecessary shell participation, which broadens attack surface and weakens trust in the launched binary path.

Content

Scanner excerpt · scripts/wechat.py (reported line 348)May include surrounding context.

python
startupinfo.wShowWindow = 1
                    CREATE_NO_WINDOW = 0x08000000

                    process = subprocess.Popen(
                        [wechat_path],
                        startupinfo=startupinfo,
                        shell=True,

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

This duplicate finding points to the same risky pattern: shell-enabled process creation for launching the desktop client. The main issue is unnecessary shell participation, which broadens attack surface and weakens trust in the launched binary path.

Content

Scanner excerpt · scripts/wechat.py (reported line 348)May include surrounding context.

python
startupinfo.wShowWindow = 1
                    CREATE_NO_WINDOW = 0x08000000

                    process = subprocess.Popen(
                        [wechat_path],
                        startupinfo=startupinfo,
                        shell=True,

Ssd 3

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The autonomous workflow collects chat content and forwards it to an AI service for reply generation, creating a direct path for sensitive conversational data to leave the messaging client. Because the system acts on natural-language content, malicious or sensitive instructions embedded in chats may influence downstream behavior or cause oversharing.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code packages chat history directly into the AI request payload as messages, preserving raw user-provided content. This creates sustained semantic exposure of potentially confidential communications and increases the risk that sensitive instructions or data are retained, logged, or mishandled by the receiving service.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script sends chat history and message contents to an external AI API without any confirmation at the transmission point. In the context of enterprise chat automation, this can leak sensitive personal or business information to a local or remote service without informed consent.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
## 命令参考

| 命令 | 功能           | 示例                                                                                                     |
|------|--------------|--------------------------------------------------------------------------------------------------------|
| `start` | 启动企业微信客户端      | `wechat.py start`                                                                                      |
| `activate` | 激活并最大化企业微信窗口   | `wechat.py activate --title 企业微信`                                                                        |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| 命令 | 功能           | 示例                                                                                                     |
|------|--------------|--------------------------------------------------------------------------------------------------------|
| `start` | 启动企业微信客户端      | `wechat.py start`                                                                                      |
| `activate` | 激活并最大化企业微信窗口   | `wechat.py activate --title 企业微信`                                                                        |
| `search_and_send` | 搜索联系人并发送消息   | `wechat.py search_and_send --contact 张三 --message 您好`                                                  |
| `get_history` | 获取指定联系人聊天记录  | `wechat.py get_history --contact 李四 --limit 15`                                                        |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| `get_history` | 获取指定联系人聊天记录  | `wechat.py get_history --contact 李四 --limit 15`                                                        |
| `auto_process` | 自动轮询联系人并智能回复 | `wechat.py auto_process --polling_times 10 --api_key xxx --api_url xxx --model xxx --contact_list xxx` |
| `stop_auto_process` | 停止自动回复       | `wechat.py stop_auto_process`                                                                          |
| `help` | 查看帮助信息       | `wechat.py help`                                                                                       |

## 核心功能说明

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring and class docstring are written entirely in Chinese, and log/messages throughout the file continue that language choice. For a general-purpose skill file, this imposes a specific language without any opt-in or documented region-specific justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring explicitly claims '反检测策略' (anti-detection strategies), which suggests functionality aimed at evading detection systems. However, the code implements only behavioral simulation primitives such as randomized delays, mouse trajectories, and typing errors, with no actual detection-evasion logic. This is an active mismatch between stated intent in documentation and implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring and surrounding user-facing natural-language text are entirely in Chinese, with no indication that other languages are supported or that the language choice is intentional and documented. Under the stated policy, forcing or implicitly requiring a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The top-level documentation describes the module as 'hardware-layer simulation' using HID devices directly. In practice, the implementation explicitly falls back to pyautogui mouse movement and keyboard input, and for text entry it uses clipboard copy/paste via pyperclip plus hotkeys when HID support is unavailable or for certain text cases, which is materially different from direct HID simulation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code can take control of the active desktop session and generate system-wide mouse and keyboard events without user confirmation, visibility controls, or scope restriction. In an agent skill context, this is dangerous because any caller able to reach these methods can drive arbitrary UI actions in other applications, potentially causing unauthorized clicks, form submission, or command execution.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The docstring for simulate_keyboard_input says it performs hardware-level keyboard input simulation. However, the code routes to _software_keyboard_input on unsupported platforms/failures, and even the Windows path switches to clipboard-based paste for Chinese or long text, so the stated intent contradicts the actual behavior for significant cases.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This path overwrites the system clipboard with arbitrary text and pastes it into the active application without preserving prior clipboard contents or notifying the user. That can leak or destroy sensitive clipboard data and can also inject attacker-controlled content into privileged or unintended destinations if the focus is on another window.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The Windows-specific path copies long or Chinese text to the clipboard and issues Ctrl+V globally, again without consent, destination validation, or clipboard preservation. In an automation skill, this makes unintended cross-application injection more dangerous because the active window may not be the intended target, especially if focus changes during execution.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The imports for HardwareSimulator, BehaviorSimulator, and AntiDetection indicate deliberate stealth and human-behavior mimicry. In a messaging automation context, anti-detection logic is suspicious because it is not needed for legitimate local automation and instead suggests evasion of platform safeguards or monitoring.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/wechat.py (reported line 314)May include surrounding context.

python
# 尝试在PATH中查找
        if IS_WINDOWS:
            try:
                result = subprocess.run(['where', 'WXWork.exe'],
                                        capture_output=True, text=True, encoding='gbk',
                                        creationflags=subprocess.CREATE_NO_WINDOW)
                if result.stdout:

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
88% confidence
Finding

This launches a process with shell=True, which increases attack surface and can cause unexpected shell interpretation on Windows. Although wechat_path is derived from local discovery rather than direct user input, using the shell for executable launch is unnecessary and unsafe, especially in an automation tool that may run with user privileges.

Content

Scanner excerpt · scripts/wechat.py (reported line 348)May include surrounding context.

python
startupinfo.wShowWindow = 1
                    CREATE_NO_WINDOW = 0x08000000

                    process = subprocess.Popen(
                        [wechat_path],
                        startupinfo=startupinfo,
                        shell=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/wechat.py (reported line 369)May include surrounding context.

python
# macOS启动
                self.logger.info("macOS启动微信")
                try:
                    subprocess.run(['open', '-a', 'WXWork'],
                                   capture_output=True, text=True, timeout=10)
                    self.logger.info("使用open命令启动微信")
                except Exception as e: