T08 · Insecure Dependencies
- Location
scripts/wechat_monitor.py:130- Finding
Unpinned Third-Party Package Execution Through NPX Fallback
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill’s WeChat auto-reply purpose is understandable, but it grants persistent private-message monitoring and message-sending authority with weak recipient checks and unsafe dependency/process handling.
Review carefully before installing. Use only with non-sensitive chats, do not enable auto-send unless you can tolerate wrong-recipient messages, avoid the Windows `npx` fallback, and prefer a review-before-send workflow with explicit contact verification and a precise stop command.
scripts/wechat_monitor.py:130Unpinned Third-Party Package Execution Through NPX Fallback
scripts/wechat_monitor.py:136Full-Screen Capture Stored at a Predictable Temporary Path
scripts/wechat_monitor.py:260Configured Contact Is Not Verified Before Detection or Message Transmission
SKILL.md:404Documented Stop Procedure Force-Terminates Unrelated Python Processes
The skill claims to monitor specific contacts and auto-reply safely, but the described mechanism relies on screenshots/window-state heuristics and does not robustly verify the actual message sender before replying. In a messaging context, this mismatch is dangerous because it can cause replies to the wrong person, leak private information, or act on misdetected UI state while presenting itself as targeted automation.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
This section describes launching a background monitor and creating an automatic reply workflow that analyzes screenshots and sends WeChat messages, but it does not prominently warn about privacy, consent, mis-send risk, or account/platform policy implications. Because the skill captures message content from the screen and impersonates the user in replies, the lack of explicit risk disclosure makes unsafe deployment much more likely.
The combined command rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt encourages forced deletion of skill artifacts without guardrails such as existence checks, path validation, or warnings. In context this is less severe than arbitrary command injection, but it still normalizes unsafe shell patterns and could cause unintended deletion if the temp paths are manipulated or misread.
停止微信监控
macOS 额外操作
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Windows 额外操作
Stop-Process -Name python -Force -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:TEMP\wechat_mon"
The combined command rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt encourages forced deletion of skill artifacts without guardrails such as existence checks, path validation, or warnings. In context this is less severe than arbitrary command injection, but it still normalizes unsafe shell patterns and could cause unintended deletion if the temp paths are manipulated or misread.
停止微信监控
macOS 额外操作
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Windows 额外操作
Stop-Process -Name python -Force -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:TEMP\wechat_mon"
The combined command rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt encourages forced deletion of skill artifacts without guardrails such as existence checks, path validation, or warnings. In context this is less severe than arbitrary command injection, but it still normalizes unsafe shell patterns and could cause unintended deletion if the temp paths are manipulated or misread.
停止微信监控
macOS 额外操作
kill $(pgrep -f wechat_monitor.py)
rm -rf /tmp/wechat_mon /tmp/wechat_pending.txt
Windows 额外操作
Stop-Process -Name python -Force -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "$env:TEMP\wechat_mon"
The README documents continuous screenshot capture of WeChat windows and automatic message sending, but it does not clearly warn users about the privacy implications of capturing chat content or the account and consent risks of automated replies. In this skill context, the behavior is directly tied to a personal messaging application, making accidental surveillance, disclosure of sensitive conversations, or unintended automated actions more dangerous than generic desktop automation.
The skill invokes shell commands, reads environment variables, and writes files/logs, but it does not declare any explicit tool scope such as allowed-tools or permissions. That makes the operational boundary unclear and increases the chance an agent will execute broader host actions than users expect, especially given the many shell-based setup, monitoring, and cleanup steps.
The skill enables ongoing monitoring and auto-reply of private WeChat messages but does not present a prominent warning about the privacy and autonomy implications before activation. In this context, lack of informed consent is risky because users may not realize the agent will continuously inspect conversations and send messages on their behalf.
The skill explicitly instructs the agent to read private chat content and imitate the user's voice in outbound messages. In a messaging skill, this is sensitive because it combines access to private communications with impersonation, increasing the chance of privacy violations, social engineering, and reputational harm if context is misunderstood.
Using nohup to launch the monitor creates session persistence beyond the immediate interaction. In this skill's context, persistence is more dangerous because the background process monitors private messaging state and can feed later autonomous actions without the user's ongoing awareness.
macOS:
nohup python3 scripts/wechat_monitor.py \
--contact "联系人名称" \
--interval 600 \
--threshold 1000 \
The skill instructs creation of a recurring automation that continues reading chat state and sending messages after the initial user action. Persistent autonomous behavior in a private messaging app materially increases risk of unintended surveillance, runaway actions, and delayed replies being sent without contemporaneous user awareness.
The recurring automation continuously checks pending chat state, re-screenshots conversations, and generates responses from private context without requiring a fresh user action each time. That creates a durable privacy exposure and raises the risk of incorrect or overbroad responses based on sensitive conversation content.
The usage text describes screenshot-based monitoring and analysis of WeChat conversations but does not clearly warn users that message content and other visible on-screen data may be captured and processed. This creates a privacy and consent risk because users may enable the skill without understanding that sensitive personal or business communications can be collected and analyzed.
The documentation explains the automation flow but does not present a prominent warning that the system will generate and send WeChat messages on the user's behalf. This can lead to unintended impersonation, accidental transmissions, or reputational harm if users do not fully appreciate that outbound communication is autonomous after setup.
The guide documents screenshot capture, UI inspection, window control, and simulated input for WeChat, but does not prominently warn that these capabilities can expose private conversations, capture unrelated on-screen data, or send unintended messages. In the context of an auto-reply/monitoring skill, these actions directly operate on a real user's desktop and messaging client, which increases the chance of privacy harm or accidental misuse if users follow the instructions without understanding the risks.
The module docstring, CLI help text, and runtime log messages are presented only in Chinese, which imposes a specific language/locale on users. The policy allows locale constraints only when documented and justified or when users are offered a choice, neither of which is present here.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
class PeekabooMacEngine(ScreenshotEngine):
"""macOS Peekaboo CLI 截图引擎"""
def take_screenshot(self, path, app_name="微信"):
r = subprocess.run(
["peekaboo", "image", "--mode", "window",
"--app", app_name, "--retina", "--path", path],
capture_output=True, text=True, timeout=15
The code explicitly sets the execution path to npx as a fallback, which means the runtime may download and execute the peekaboo-win package without a pinned version or integrity control. In a desktop-monitoring skill with screen-capture privileges, this materially increases risk because any malicious package code would run with access to sensitive user context and screenshots.
On Windows, the code can fall back to executing npx peekaboo-win ... when no local binary is found. That behavior may fetch and run an unpinned package from the package ecosystem at runtime, creating a supply-chain execution risk where a malicious or tampered package could execute arbitrary code on the host.
"--output", path]
try:
r = subprocess.run(cmd, capture_output=True, text=True, timeout=15)
if r.returncode != 0:
print(f" PeekabooWin stderr: {r.stderr.strip()}", flush=True)
return r.returncode == 0
No suspicious patterns detected.