Back to skill

Security audit

feishu-wiki

Security checks for vulnerabilities and agentic risk

Overview

This Feishu Wiki skill is mostly coherent, but it recommends broad space-wide administrator access for a bot and includes high-impact wiki reorganization actions without clear user confirmation or scope limits.

Review before installing. Use a dedicated bot identity, grant access only to the specific spaces or subtrees needed, avoid space-wide administrator group membership unless operationally unavoidable, and require human confirmation for creating top-level spaces, moving nodes, deleting nodes, or applying broad permissions. Also document how to revoke the bot's Feishu permissions after use.

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

Error
Location
SKILL.md:38
Finding

Excessive Wiki-Wide Administrative Authorization

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 38–41 and 130–135
Vulnerability Type: Excessive privilege through inherited group membership
Risk Level: High

Vulnerable Snippet

markdown
1. **权限穿透**:空间创建后机器人默认无权维护。**强烈建议使用“群组授权法”**:
   - 创建一个包含机器人的群组。
   - 在知识库【设置】-【成员设置】中,添加该群组为“管理员”。
   - 这样机器人即可通过群组身份获得该空间内所有页面的操作权。

The same recommendation is repeated later:

markdown
**空间授权的“群组法”穿透 (Critical):**
*   **风险**:由于飞书租户安全策略,机器人通过 API 直接创建“顶级知识空间”往往会报权限错误 (403)。此外,即便有了空间,机器人默认对空间内的节点也可能无操作权。
*   **对策**:教程必须强调 **“群组授权最佳实践”**:
    1.  手动创建一个包含机器人的【群组】。
    2.  在 Wiki 空间设置中,将该群组添加为【管理员】。
    3.  这样机器人即可通过群组身份获得空间内所有页面的创建、移动和编辑权限。

Technical Analysis

The Skill recommends adding the bot to a group and assigning that group the Wiki-space administrator role. This causes the bot to inherit broad administrative access to every page in the space rather than receiving only the permissions necessary for a specific task.

The document explicitly frames this technique as permission traversal and uses it to overcome the bot's default access restrictions. The resulting authorization is not limited to a designated subtree, operation, or temporary workflow. This violates least-privilege principles.

The risk is compounded by the Skill's documented governance capabilities, which include moving, renaming, and deleting existing Wiki content. A compromised bot identity, unsafe agent instruction, operator mistake, or unauthorized use of its tenant token could therefore affect unrelated organizational content.

Attack Path

  1. An administrator follows the Skill's recommendation and creates a group containing the bot.
  2. The administrator assigns that group the administrator role for a Wiki space.
  3. The bot inherits space-wide privileges, including access to pages unrelated to its immediate task.
  4. An attacker compromises the bot or its tenant access token, or induces the agent to perform an unintended privileged operation.
  5. The bot us ...[truncated 1085 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place the bot in a group holding space-wide administrator privileges.
  2. Grant the bot access only to the specific Wiki space, subtree, or nodes required by its defined workflow.
  3. Use a dedicated service identity with narrowly scoped API permissions instead of a broadly privileged shared group.
  4. Separate read, create, edit, move, and delete capabilities. Do not grant destructive permissions unless they are strictly required.
  5. Require explicit human confirmation for node deletion, cross-space movement, bulk modification, and other high-impact operations.
  6. Implement an allowlist of authorized space IDs and parent node tokens in the integration layer.
  7. Validate that every requested operation remains within the approved space and subtree before making an API call.
  8. Maintain audit logs for privileged operations and alert on bulk edits, unexpected moves, deletion attempts, or access outside approved nodes.
  9. Establish a documented revocation process that removes the bot from privileged groups and invalidates its tenant token when access is no longer required.
  10. If broad access is operationally unavoidable, isolate the bot in a dedicated Wiki space containing no unrelated or sensitive material.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill explicitly enables creation and management of shared Feishu Wiki spaces and nodes, including permission setup guidance that can broaden the bot's administrative reach, but it does not warn that these actions modify shared organizational knowledge assets. In practice, an agent using this skill could create or reorganize company-visible structures without clear user confirmation, causing clutter, governance issues, or accidental changes to collaborative content organization.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented move-node capability can alter the location of shared wiki content, but the skill omits a warning that moving nodes may disrupt team organization, expected navigation paths, inherited permissions, and downstream references. Because wiki structures are collaborative assets, an automated or mistaken move can have organization-wide effects even when the API call succeeds as designed.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.