Back to skill

Security audit

Feishu Docs 1.1.1

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Feishu document tool, but it needs review because it can immediately delete, replace, and share cloud documents and accepts app secrets through command-line arguments.

Install only with a least-privileged Feishu app, avoid passing secrets with --app-secret, prefer protected environment or secret-manager injection, and require human confirmation before delete, full replace, or permission-changing commands.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
bin/cli.js:41
Finding

Feishu App Secret Can Be Exposed Through Command-Line Arguments

Content
View full analysis
', '飞书应用ID(覆盖环境变量)') .option('--app-secret ', '飞书应用密钥(覆盖环境变量)') .action(async (options) => { try { if (options.appId) process.env.FEISHU_APP_ID = options.appId; if (options.appSecret) process.env.FEISHU_APP_SECRET = options.appSecret; ``` The same `--app-secret` option is repeated across the CLI commands. ### Technical Analysis The CLI permits a Feishu App Secret to be supplied directly as a command-line argument. Command-line arguments are not an appropriate secret transport because they can be exposed through: - Shell history files. - Process inspection utilities and process-monitoring services. - Agent execution logs, audit records, or terminal session recordings. - CI/CD job output and command tracing. - Diagnostic or crash-reporting systems that retain command invocations. Copying the argument into `process.env` does not remove it from the original process argument vector or any previously recorded shell history. The environment-variable configuration already supported by the project is safer than accepting secrets through a visible argument, although environment variables must also be protected from logging and unauthorized process access. ### Attack Path 1. A user or Agent invokes the Skill with a command such as: ```bash node bin/cli.js get --document-id dcnxxxxxx \ --app-id cli_xxxxxx \ --app-secret actual-secret-value ``` 2. The complete command is retained in shell history, Agent tool logs, CI logs, telemetry, or local process metadata. 3. An attacker with access to one of those records obtains the App ID and App Secret. 4. The attacker submits the stolen credentials to Feishu's tenant access-token endpoint. 5. Feishu returns a tenant access token if the cr ...[truncated 977 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
package-lock.json:29
Finding

Locked Dependencies Are Retrieved from a Non-Default Registry Mirror

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (44)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SETUP.md (reported line 59)May include surrounding context.

方法A:使用.env文件(推荐)

bash
cd skills/feishu-docs
cp .env.example .env
# 编辑.env文件,填入你的凭证

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description emphasizes document CRUD and permission management, but the documented behavior also includes search, folder listing, local file input, and CLI credential overrides. This mismatch can mislead operators about the true reach of the skill, increasing the chance of overbroad deployment and unintended data access.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The description emphasizes document CRUD and permission management, but the documented behavior also includes search, folder listing, local file input, and CLI credential overrides. This mismatch can mislead operators about the true reach of the skill, increasing the chance of overbroad deployment and unintended data access.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 53)May include surrounding context.

md
node bin/cli.js --help

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 164)May include surrounding context.

md
node bin/cli.js --help

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 135)May include surrounding context.

md
GET    /docx/v1/documents/{document_id}/raw_content          # 获取文档纯文本
GET    /docx/v1/documents/{document_id}/blocks               # 获取文档块列表
PATCH  /docx/v1/documents/{document_id}/blocks/{block_id}    # 更新块
DELETE /docx/v1/documents/{document_id}/blocks/{block_id}    # 删除块
POST   /docx/v1/documents/{document_id}/blocks/{block_id}/children  # 插入子块
POST   /docx/v1/documents/blocks/convert                     # Markdown/HTML→块
DELETE /drive/v1/files/{file_token}?type=docx                # 删除文档

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 138)May include surrounding context.

md
DELETE /docx/v1/documents/{document_id}/blocks/{block_id}    # 删除块
POST   /docx/v1/documents/{document_id}/blocks/{block_id}/children  # 插入子块
POST   /docx/v1/documents/blocks/convert                     # Markdown/HTML→块
DELETE /drive/v1/files/{file_token}?type=docx                # 删除文档
GET    /drive/v1/files?folder_token=xxx                      # 列出文件夹文件
POST   /drive/v1/permissions/{token}/members?type=docx       # 添加权限成员
GET    /drive/v1/permissions/{token}/members?type=docx       # 获取权限成员

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · example-usage.md (reported line 67)May include surrounding context.

md
### 订单管理
- GET /api/orders
- POST /api/orders
- DELETE /api/orders/{id}

## 代码示例

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
96% confidence
Finding

The lockfile pins axios to 1.13.5, and the supplied advisory set includes multiple high-risk issues such as SSRF-related proxy bypass and prototype-pollution-adjacent behaviors. In a document API skill that performs outbound HTTP requests to Feishu and may process user-controlled URLs, headers, or content conversions, vulnerable HTTP client behavior can directly affect credential handling, request routing, and response trust.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: form-data==4.0.5 — 1 advisory(ies): CVE-2026-12143 (form-data: CRLF injection in form-data via unescaped multipart field names and f)

High
Category
Supply Chain
Confidence
90% confidence
Finding

form-data is present at 4.0.5 and the listed advisory describes CRLF injection through unescaped multipart field names/filenames. If this skill uploads attachments, imports HTML/Markdown-derived assets, or constructs multipart requests using user-influenced names, an attacker may be able to manipulate request structure or smuggle unintended headers/content to upstream services.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: axios==1.13.5 — 16 advisory(ies): CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more

High
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency finding indicates axios may resolve to a known vulnerable version with multiple advisories, including SSRF-related and request-handling issues. Because this skill is an API integration that likely makes authenticated outbound HTTP requests to Feishu/Lark services, a vulnerable HTTP client is more dangerous here: it could expose tokens, enable request manipulation, or bypass proxy protections in network-restricted environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The markdown usage examples include a delete command for documents, but the README does not warn that this operation is destructive or potentially irreversible. Under the markdown-file criteria, behaviors affecting user data should be accompanied by an explicit warning about impact and caution before use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description shows commands for sharing documents and changing permissions, which can expose user data to additional recipients, but it does not include any privacy or access-control warning. Markdown guidance for operations affecting user data or privacy should explicitly disclose those risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file’s instructional content is entirely in Chinese, including headings, steps, examples, and troubleshooting guidance. Under the policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SETUP.md (reported line 44)May include surrounding context.

方法B:手动安装

bash
# 创建技能目录
mkdir -p /Users/steven/openclaw/skills/feishu-docs
cd /Users/steven/openclaw/skills/feishu-docs

# 复制所有文件到目录

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SETUP.md (reported line 44)May include surrounding context.

方法B:手动安装

bash
# 创建技能目录
mkdir -p /Users/steven/openclaw/skills/feishu-docs
cd /Users/steven/openclaw/skills/feishu-docs

# 复制所有文件到目录

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill metadata declares required environment variables but does not declare any explicit tool scope or allowed-tools boundary. In an agent setting, this weakens least-privilege controls and makes it harder for the runtime or reviewers to understand that the skill can access sensitive credentials and external APIs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill advertises destructive update and delete operations without an explicit warning, confirmation requirement, or safety guidance. In an agent-driven workflow, this can lead to accidental document destruction or irreversible content replacement if invoked from ambiguous prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The delete command performs a destructive action immediately after receiving a document ID, with no confirmation prompt, dry-run mode, or safety interlock. In a CLI that manages remote Feishu documents, a mistyped ID, automation bug, or social-engineered command invocation can cause irreversible deletion of important data.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest describes a skill for creating, reading, updating, deleting Docx documents, converting Markdown/HTML content, and managing document permissions. This file also exposes document discovery features via search and listing arbitrary folder files, which are distinct content-discovery/file-browsing capabilities not mentioned in the declared skill scope.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.