Back to skill

Security audit

Feishu Wiki Query

Security checks for vulnerabilities and agentic risk

Overview

The skill is meant to query Feishu wiki content, but it exposes Feishu app credentials and includes under-scoped outbound messaging and broader spreadsheet permission guidance.

Review before installing. Do not use this package as-is with real Feishu resources unless the exposed app secret has been revoked and replaced, the packaged config has been cleared, spreadsheet permissions are reduced or explicitly justified, and any image upload or message sending requires clear user approval and verified recipients.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
SKILL.md:226
Finding

Hard-Coded Feishu Application Credentials Expose Tenant Access

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:263
Finding

Write-Capable Spreadsheet Permission Required for a Read-Only Workflow

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is described as a knowledge-base query/read capability, but the documentation adds active message-sending behavior, including uploading and sending images to users via Feishu IM. This materially expands the skill from read-only retrieval into outbound communication and data exfiltration pathways, increasing abuse potential if invoked on sensitive document content.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation embeds a Feishu app_id and app_secret directly in the skill, allowing anyone with access to the file to obtain tenant access tokens. Hardcoded credentials can be reused outside the stated query workflow and may grant broad API access depending on the app's permissions, making this a direct credential exposure issue.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
| 问题 | 原因 | 解决方案 |
|------|------|----------|
| `Search is not available` | 知识库搜索未开放 | 改用 `nodes` 遍历 |
| `Missing access token` | token 过期 | 重新获取 tenant_access_token |
| `receive_id_type is required` | 发送消息缺参数 | URL 加 `?receive_id_type=open_id` |
| `WrongBaseToken` | token 格式错误 | 确认使用的是正确的 token 类型 |
| `NOTEXIST` | 文档不存在或无权访问 | 检查 token 是否正确 |

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger description includes broad everyday phrases such as querying schedules or canteen menus, which can cause the skill to activate unexpectedly in contexts the user did not intend. Overbroad triggering is risky here because the skill accesses configured knowledge bases and may expose private organizational content when a different tool or a normal chat response was expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill stores knowledge-base configuration in a local file under the user's home directory, but the documentation does not clearly warn users that this information will be persisted. Persisted URLs, node tokens, and space identifiers may reveal internal resource structure and remain accessible to other local processes or future sessions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation instructs the operator to download document images and transmit them over network APIs without privacy warnings, data handling constraints, or explicit consent checks. In the context of an enterprise knowledge-base reader, this creates a clear path for sensitive document media to be exported and redistributed outside the original document context.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This finding is the same external token acquisition endpoint highlighted separately by the scanner. It is dangerous because it uses embedded application credentials to establish authenticated external access that can then be leveraged for additional API operations.

Content

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

md
import json

# 1. 获取 tenant_access_token
token_resp = requests.post(
    "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
    json={
        "app_id": "cli_a938e5e808b8dbca",

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This finding is the same external token acquisition endpoint highlighted separately by the scanner. It is dangerous because it uses embedded application credentials to establish authenticated external access that can then be leveraged for additional API operations.

Content

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

md
import json

# 1. 获取 tenant_access_token
token_resp = requests.post(
    "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
    json={
        "app_id": "cli_a938e5e808b8dbca",

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This request uploads image content to an external Feishu API, which constitutes outbound transfer of document-derived data. In a knowledge-base query skill, such transfer increases the risk of leaking sensitive embedded media, especially if users are not clearly informed or recipient validation is weak.

Content

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

md
# 2. 上传图片
with open('/tmp/图片.png', 'rb') as f:
    img_resp = requests.post(
        "https://open.feishu.cn/open-apis/im/v1/images",
        headers={"Authorization": f"Bearer {token}"},
        files={"image": ("图片.png", f.read(), "image/png")},

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This finding is the same outbound message-sending operation flagged at a more specific match granularity. It remains a true issue because it provides a ready-made channel to transmit internal image content to user accounts, which exceeds the query-only role of the skill.

Content

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

md
image_key = img_resp.json()["data"]["image_key"]

# 3. 发送图片消息(需提供接收者的 open_id)
msg_resp = requests.post(
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
    headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
    json={

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

This finding is the same outbound message-sending operation flagged at a more specific match granularity. It remains a true issue because it provides a ready-made channel to transmit internal image content to user accounts, which exceeds the query-only role of the skill.

Content

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

md
image_key = img_resp.json()["data"]["image_key"]

# 3. 发送图片消息(需提供接收者的 open_id)
msg_resp = requests.post(
    "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id",
    headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
    json={

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

A document-query skill should not require broader-than-read permissions unless there is a clearly justified write use case. Requiring the non-readonly sheets:spreadsheet permission increases blast radius if the credential or token is abused, enabling modification of spreadsheet content rather than simple retrieval.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This duplicate match points to the spreadsheet example's token retrieval endpoint. The concern is valid because credential-backed external authentication is embedded directly in documentation for a read-oriented skill, unnecessarily widening exposure if copied or reused.

Content

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

md
import json

# 获取 token
token_resp = requests.post(
    "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
    json={
        "app_id": "cli_a938e5e808b8dbca",

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This duplicate match points to the spreadsheet example's token retrieval endpoint. The concern is valid because credential-backed external authentication is embedded directly in documentation for a read-oriented skill, unnecessarily widening exposure if copied or reused.

Content

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

md
import json

# 获取 token
token_resp = requests.post(
    "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal",
    json={
        "app_id": "cli_a938e5e808b8dbca",

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

文档中的首次配置提示、命令格式和输出格式均固定为中文表达,如“添加知识库”“查看知识库”以及中文来源标注。文件未说明该技能仅面向中文环境,也未给出用户语言选择,存在未获用户同意即固定语言/locale 的问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The natural-language value "杨毛毛知识库" suggests the skill is oriented to a specific language/locale, but this file provides no indication that the language restriction is optional, user-selected, or justified as region-specific. Under the policy rules, hard-coded locale-specific language can be a violation when no opt-in or documented scope is present.

Content

No source excerpt is available for this finding.