T07 · Tool Hijacking and Spoofing
- Location
handler.py:13- Finding
Import Path Precedence Enables Local Module Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears intended for Enterprise WeChat user administration, but it grants and changes account state through under-scoped, partially missing code paths.
Review this carefully before installing. Only deploy it in a controlled WeCom environment after confirming the missing dependency modules, import paths, activation authentication, audit logging, and users.json synchronization process are safe for your organization.
handler.py:13Import Path Precedence Enables Local Module Hijacking
auto_activate.py:25Pending Accounts Can Be Activated Using Unverified Caller-Supplied Identity Data
该代码与描述存在部分不符。描述涵盖更广泛的“用户管理”“管理员添加用户权限”“完整生命周期管理”,而实际代码块的核心功能只是自动激活已预先存在的用户账号,并更新登录相关字段、生成欢迎消息。它并不执行管理员添加权限、用户创建、停用、删除或其他完整生命周期操作。虽然“用户首次登录自动激活”这一点与描述一致,但整体声明明显超出此代码块实际能力,因此应判定为不匹配。
声明将该技能描述为完整的企业微信用户管理能力,涵盖添加权限、首次登录自动激活和完整生命周期管理。但提供的代码块只展示了一个处理“添加用户”消息的处理器:检查发起人权限、解析命令、搜索门店、处理门店匹配数量,并生成确认卡片返回。虽然代码中导入了 check_and_activate、handle_callback、on_user_login 等函数,说明项目可能存在相关能力,但在本代码块内并没有调用这些逻辑,因此就“实际代码块 actually does”而言,不能支持“首次登录自动激活”或“完整生命周期管理”的声明。故描述相对代码行为存在明显夸大与范围不符。
The markdown states that first login will "自动激活" and elsewhere explains that the system updates the pending user record to the real name and records login time. These are changes to user data and account state, but the documentation does not clearly warn operators or end users that a first greeting/login can trigger automatic profile modification and persistence.
The document says the user's real name is automatically fetched from Enterprise WeChat on first login, which involves collecting personal data from an external system. While functionality is described, there is no explicit warning about this data access, storage, or its privacy implications.
The markdown describes automatic activation as updating the username, recording login time, and later notes that users.json files are auto-synchronized, but it does not present these behaviors as a user-facing warning about modifying stored user data. Because these actions affect account data and configuration state, the description should explicitly disclose them as operational side effects.
Triggering first-time activation on any inbound message is overly permissive because it treats mere message receipt as sufficient proof that activation should occur. In a user-management context, this can activate accounts unintentionally, enable premature state changes, and reduce the opportunity for explicit approval or verification before modifying user records.
The troubleshooting and best-practice sections recommend direct copy operations for users.json without warning about overwriting authoritative configuration or losing concurrent updates. In a user-management skill, unsafe config synchronization can corrupt account state, roll back permissions, or unintentionally reactivate/deactivate users if operators follow the instructions blindly.
This Python file contains its primary documentation and user-facing interaction text in Chinese, and there is no indication that the skill is region-specific or that users can opt into a preferred language. Under the policy, forcing a specific language without user choice is a natural-language policy violation.
The documentation describes privileged account-management operations that can create users, assign roles, and activate accounts, but it does not clearly warn that these actions change access control state and should only be performed with verified administrative intent. In an agent skill context, this omission increases the risk of unsafe automation or accidental privilege provisioning, especially because the examples are directly executable tool calls.
Natural-language content throughout the file forces a single language/locale presentation without offering the user a choice or documenting a justified locale restriction. Under the stated policy, this can be a language/locale policy violation unless the constraint is explicit and justified.