T05 · Unauthorized Access and Privilege Escalation
Warning
- Location
- SKILL.md:86
- Finding
- Excessive Feishu Permissions Violate Least Privilege## Vulnerability Details **File Location**: `SKILL.md`, lines 86–110 **Vulnerability Type**: Excessive application permissions **Risk Level**: Medium ### Vulnerable Code ```json { "scopes": { "tenant": [ "im:message", "im:message:send_as_bot", "im:message:readonly", "im:message.p2p_msg:readonly", "im:message.group_at_msg:readonly", "im:resource", "im:chat.members:bot_access", "im:chat.access_event.bot_p2p_chat:read", "contact:user.employee_id:readonly", "contact:contact.base:readonly", "application:application:self_manage", "application:application.app_message_stats.overview:readonly", "application:bot.menu:write", "event:ip_list", "aily:file:read", "aily:file:write", "corehr:file:download" ], "user": [ "aily:file:read", "aily:file:write", "im:chat.access_event.bot_p2p_chat:read" ] } } ``` ### Technical Analysis The skill presents this scope set as the minimum permissions required by OpenClaw. However, several permissions are not connected to any operation in the documented bot setup or message-processing workflow. These include application self-management, application statistics access, bot-menu modification, IP-list access, Aily file read/write access, and HR file download access. Importing and publishing this complete scope set grants the application capabilities substantially broader than the stated messaging, event-subscription, and limited identity-lookup requirements. This breaks the principle of least privilege and increases the consequences of credential compromise or misuse. ### Attack Path 1. An administrator follows the skill and imports the supplied permission set. 2. The administrator publishes the Feishu application, activating the granted scopes. 3. The application ID and App Secret are configured in OpenClaw so the Gatew ...[truncated 1179 chars]
- Remediation
- ## Remediation Suggestions 1. Remove all scopes that are not demonstrably required by the runtime workflow, particularly: - `aily:file:read` - `aily:file:write` - `corehr:file:download` - `application:application:self_manage` - `application:application.app_message_stats.overview:readonly` - `application:bot.menu:write` - `event:ip_list` 2. Retain only permissions required for bot messaging, event receipt, message resources, chat access, and the minimum necessary identity lookup. 3. Document the exact Feishu API endpoint or runtime operation requiring each retained scope. 4. Move optional capabilities into separate, clearly labeled opt-in permission profiles instead of including them in the default configuration. 5. Apply the narrowest available Feishu data range for every retained permission. 6. Revoke unnecessary permissions from existing applications and publish a new version so the reduced scope set becomes effective. 7. Rotate the App Secret after permission reduction if it may have been exposed, and store it in a protected secret manager rather than general plaintext configuration. 8. Periodically review API usage logs and granted scopes to detect unused privileges or unauthorized access.
