Back to skill

Security audit

飞书开放平台应用自动化配置

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to set up a Feishu/OpenClaw bot as advertised, but it asks an admin to expose app secrets and grant broad production permissions without enough scoping or safety guidance.

Review and minimize every Feishu permission before installing or running this skill. Treat the App Secret as a credential: do not paste it into chat or logs, store it only in a protected secret store or secured config, and rotate it if exposed. Have a Feishu administrator confirm the data range and business need before publishing the app.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

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.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly instructs users to reveal and extract App ID and App Secret from the browser UI, but it does not provide a clear warning that these are highly sensitive credentials or describe safe handling requirements. In this context, the skill is automating privileged admin actions in an already authenticated browser, which increases the likelihood that secrets will be exposed in logs, screenshots, clipboard contents, shell history, or to the agent itself.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill provides a bulk-import permission set and walks through publishing the app without a prominent warning that these scopes grant broad access to messaging, contact data, files, bot capabilities, and event feeds. Because the skill is designed to automate application creation and deployment for a Feishu tenant, missing consent and least-privilege guidance materially increases the risk of overprivileged apps being created and published into production.

Static analysis

No suspicious patterns detected.