T09 · Insecure Skill Coding Practices
- Location
tool/wechat_cli/core/db_cache.py:27- Finding
Predictable Shared Cache Directory Enables Privileged File Overwrite and Deletion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a local WeChat reader, but it uses invasive key extraction and privilege-changing workflows that users should review carefully before installing.
Install only if you intentionally want an agent/tool to extract keys from your running desktop WeChat process and read local messages. Avoid shared machines, avoid granting CAP_SYS_PTRACE to the system python3 interpreter, prefer HTTPS-only destinations, and clean or remove ~/.wechat-cli and the temp cache when finished.
tool/wechat_cli/core/db_cache.py:27Predictable Shared Cache Directory Enables Privileged File Overwrite and Deletion
tool/wechat_cli/keys/scanner_linux.py:105Guidance Grants CAP_SYS_PTRACE to the Shared Python Interpreter
tool/wechat_cli/keys/scanner_macos.py:17Unverified Externally Obtained macOS Helper Is Executed with Sensitive Privileges
tool/pyproject.toml:1Mutable Unhashed Python Dependencies Allow Installation-Time Supply-Chain Compromise
SKILL.md:225Documentation Encourages Transmission of WeChat-Derived Reports over Plaintext HTTP
tool/wechat_cli/keys/scanner_macos.py:72Optional Re-Signing Adds Debug Entitlement and Weakens WeChat Process Protections
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The Windows-specific behavior includes scanning another process’s memory regions through OS APIs to recover encryption keys, yet this invasive capability is not reflected in the top-level purpose statement. In context, this is particularly sensitive because it transforms the skill into a memory-inspection/key-recovery tool for a consumer messaging app.
The documentation instructs users to re-sign the WeChat application with the com.apple.security.get-task-allow entitlement so the tool can inspect process memory and extract encryption keys. This is a powerful host modification that weakens platform protections, modifies a third-party app binary, and enables access to highly sensitive private message databases far beyond what a simple summarization skill should require.
The re-signing instructions tell the user to run privileged commands that modify /Applications/WeChat.app and grant debugging-style process inspection capability, but the warning language downplays the seriousness by calling it safe and minimizing consequences. In a hostile or careless deployment, this can normalize weakening macOS security controls and exposing private communications to any component able to leverage the modified app context.
The disclaimer claims the tool is read-only and does not interfere with WeChat, but earlier instructions require re-signing the WeChat app and persisting extracted keys or plaintext cache on disk. Those actions materially alter the local environment and create new sensitive artifacts, so the safety claims are misleading and may cause users or agents to underestimate the risk.
This code scans process memory for candidate key material and validates it against database pages, effectively extracting live decryption keys from a running WeChat process. That is a credential-harvesting capability, not a normal summarization/desensitization function, and it creates a powerful primitive for unauthorized access to protected message databases on the host.
The code writes raw WeChat database decryption keys to a JSON file on disk, which materially increases exposure of highly sensitive credentials beyond transient local use. Even with chmod(0o600), plaintext key persistence enables later theft by malware, backups, other local admin users, or accidental disclosure, and it exceeds the manifest’s user-facing description of merely reading/desensitizing messages for summaries.
The file enumerates /proc, identifies candidate WeChat processes, parses memory maps, and prepares broad readable-region scanning. In a summarization/desensitization skill, this is disproportionate capability: it creates a generic process-inspection primitive that can expose secrets from process memory and normalizes invasive host introspection.
The code explicitly requires root or CAP_SYS_PTRACE and then reads another process's memory to recover WeChat database keys. That is a powerful credential-extraction capability beyond ordinary local file access, and in the skill context it materially increases the risk of unauthorized surveillance, privilege misuse, and compromise of private communications if invoked on the wrong host or user session.
The extraction flow proceeds to scan live process memory and derive keys without a clear, explicit warning at the point of action about the privacy and security implications. In this skill's context, the lack of a strong warning is more dangerous because the advertised purpose emphasizes privacy and local-only handling, which could mislead users about how invasive the implementation actually is.
Adding com.apple.security.get-task-allow specifically enables debugging-style access that facilitates process-memory inspection, which is not justified by the stated purpose of summarizing a user's own local WeChat messages. In this skill context, that capability is especially dangerous because it is used to recover encryption keys from a live process, bypassing normal access boundaries.
No suspicious patterns detected.