Back to skill

Security audit

feishu-perm-help

Security checks for vulnerabilities and agentic risk

Overview

This is a real Feishu permission helper, but it persistently enables document permission management for every configured Feishu account without account selection or confirmation.

Review this before installing if you have multiple Feishu accounts or sensitive documents. Prefer enabling permission management only for the specific account that needs it, confirm the Feishu app scopes, and keep a backup of ~/.openclaw/openclaw.json before running the helper.

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
scripts/enable-perm-tool.js:43
Finding
Unrestricted Enablement of Feishu Permission Management Across All Accounts<![CDATA[ ## Vulnerability Details **File Location**: `scripts/enable-perm-tool.js`, lines 43-65 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Code ```js // 启用顶层 tools.perm if (!config.channels.feishu.tools) { config.channels.feishu.tools = {}; } config.channels.feishu.tools.perm = true; console.log('✅ 已启用 channels.feishu.tools.perm'); // 为所有账号启用 perm 工具 const accounts = config.channels.feishu.accounts || {}; const accountNames = Object.keys(accounts); if (accountNames.length === 0) { console.log('⚠️ 未配置飞书账号'); } else { console.log(`📋 找到 ${accountNames.length} 个飞书账号:${accountNames.join(', ')}`); for (const accountName of accountNames) { const account = accounts[accountName]; if (!account.tools) { account.tools = {}; } account.tools.perm = true; ``` ### Technical Analysis The script unconditionally enables the sensitive Feishu permission-management tool at the channel level and for every configured Feishu account. It does not require the user to select an account, define an allowlist, confirm the affected scope, or opt into channel-wide activation. The enabled tool supports listing, adding, and removing collaborators from Feishu resources. Enabling this capability for all accounts violates the principle of least privilege when the legitimate objective is to activate it for only one account. The channel-level setting may also broaden access beyond the explicit per-account configuration, depending on how OpenClaw resolves inherited tool permissions. The script does not itself add or remove collaborators. Exploitation requires a user or Agent that can invoke the newly enabled `feishu_perm` tool and Feishu application credentials possessing the corresponding document-permission scopes. ### Attack Path 1. An administrator has multiple Feishu accounts configured in `~/.openclaw/openclaw.json`. 2. The administrator runs the helper intending to enable permiss ...[truncated 1344 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require an explicit account identifier as a command-line argument and modify only that account: ```bash node scripts/enable-perm-tool.js --account default ``` 2. Do not enable `channels.feishu.tools.perm` globally by default. Require a separate, explicit option such as `--global` for channel-wide activation. 3. Validate that the requested account exists before making changes, and terminate without modifying the configuration if validation fails. 4. Display the exact configuration changes and affected accounts before writing them, then require interactive confirmation unless a deliberate non-interactive flag is supplied. 5. Support an account allowlist for automated deployments so that only approved accounts receive the permission-management capability. 6. Create a restrictive backup of `~/.openclaw/openclaw.json` before modification and write updates atomically to avoid configuration loss. 7. Document that enabling the tool permits collaborator listing, addition, and removal, and advise administrators to grant the underlying Feishu application only the minimum API scopes and resource access required. 8. After activation, verify the effective tool permissions separately for each account rather than checking only whether the tool was registered globally. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The README promotes a tool that can add, view, and remove collaborators on Feishu documents without any warning, approval guidance, or mention of the security sensitivity of changing access controls. Because this skill directly affects document permissions, normalizing one-click permission changes increases the risk of accidental over-sharing or unauthorized access changes, especially if invoked by users who do not understand the implications.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documentation states that installation will automatically modify the local OpenClaw configuration and restart the Gateway, but it does not present this as a clear warning before the user installs or enables the skill. Silent or under-emphasized configuration changes and service restarts can surprise users, disrupt running workflows, and expand the agent's effective permissions without informed consent.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The usage section instructs users to speak to the bot in Chinese and provides only Chinese command examples, with no indication that other languages are supported or that Chinese is a required locale. This can constitute a language/locale policy issue because the skill appears to impose a specific language without user opt-in or justification.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The description advertises a one-click capability to enable permission management for Feishu documents and spreadsheets without stating narrow activation conditions or user-confirmation requirements. Because this skill manages collaborator permissions, broad triggering increases the chance of unintended invocation that could modify access control on sensitive resources.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
All invocation examples instruct the user to speak to the bot in Chinese, and the document does not mention support for other languages or that the skill is intentionally limited to a Chinese-language Feishu environment. That can be a natural-language policy issue when a specific language is effectively imposed without opt-in or justification.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The file's comments and all user-facing console messages are written in Chinese, indicating the skill is designed to operate in a single language without any visible opt-in or fallback. Under the policy, forcing a specific language without user choice is a natural-language locale violation.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/enable-perm-tool.js:80