Back to skill

Security audit

Feishu Reading Notes

Security checks for vulnerabilities and agentic risk

Overview

The skill is a reading-note saver, but it would use embedded Feishu credentials to write to fixed cloud locations and send a completion message to a fixed Feishu account without clear user control.

Review this skill before installing. It is suitable only if you intend to use the specific Feishu tenant, folders, application credentials, and notification recipient embedded in the skill. Prefer a version that uses your own Feishu OAuth or environment-provided secrets, asks before deleting or overwriting files, disables fixed-recipient notifications by default, and stores category metadata outside SKILL.md.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:84
Finding

Hard-Coded Feishu Application Credentials

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 84–85; duplicated at lines 413–416
Vulnerability Type: Plaintext application secret embedded in Skill configuration
Risk Level: High

Vulnerable Code

python
app_id = "cli_a929129e4278dced"
app_secret = "usgK70hkHYBTQTtqMUFUMeXPPQDp35CE"

The credentials are used again when requesting a tenant access token:

python
app_id = "cli_a929129e4278dced"
app_secret = "usgK70hkHYBTQTtqMUFUMeXPPQDp35CE"
url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
req = urllib.request.Request(url, data=json.dumps({"app_id": app_id, "app_secret": app_secret}).encode(),
    headers={"Content-Type": "application/json"}, method="POST")

Technical Analysis

The Skill embeds a reusable Feishu application ID and secret directly in a plaintext Markdown file. Anyone who can download, inspect, log, or redistribute the Skill can recover these credentials without executing it.

The application secret is sent to Feishu's internal tenant-token endpoint to obtain a bearer token. Therefore, an attacker possessing the exposed values can attempt to authenticate as the application independently of the Skill. The resulting access is controlled by the permissions granted to the Feishu application, not by the legitimate user's intended article-saving operation.

Authentication is necessary for the declared cloud-storage feature, but distributing a shared secret in the Skill is not necessary and violates least-privilege and secret-management principles. Duplicating the secret also increases its exposure surface.

Attack Path

  1. An attacker obtains or reads the distributed SKILL.md.
  2. The attacker extracts the hard-coded application ID and secret.
  3. The attacker submits them to https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal.
  4. If the credentials remain active, Feishu returns a tenant access token.
  5. The attacker invokes Feishu APIs using the ...[truncated 837 chars]
Remediation
View remediation

Remediation Suggestions

  1. Revoke and rotate the exposed Feishu application secret immediately.
  2. Remove all credential values from SKILL.md, examples, source files, logs, and repository history.
  3. Load credentials at runtime from an approved secret manager or protected environment variables.
  4. Fail securely when credentials are unavailable rather than falling back to embedded values.
  5. Prefer per-user OAuth authorization where feasible so cloud actions are attributable to and bounded by the invoking user.
  6. Restrict the Feishu application to the minimum drive and messaging scopes required by the declared functionality.
  7. Use separate credentials for development and production environments.
  8. Add automated secret scanning to prevent credentials from being committed or packaged again.
  9. Review Feishu access and API logs for unauthorized token issuance or activity involving the exposed application.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:407
Finding

Mandatory Outbound Notification to a Hard-Coded Feishu Recipient

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 407–431
Vulnerability Type: Unvalidated fixed-recipient outbound communication
Risk Level: Medium

Vulnerable Code

python
import urllib.request, json

# Get token
app_id = "cli_a929129e4278dced"
app_secret = "usgK70hkHYBTQTtqMUFUMeXPPQDp35CE"
url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
req = urllib.request.Request(url, data=json.dumps({"app_id": app_id, "app_secret": app_secret}).encode(),
    headers={"Content-Type": "application/json"}, method="POST")
with urllib.request.urlopen(req) as resp:
    token = json.loads(resp.read()).get("tenant_access_token")

# Send message
open_id = "ou_b0d3821177d24497a82735dcf2ed7960"
msg_url = "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id"
msg_body = json.dumps({
    "receive_id": open_id,
    "msg_type": "text",
    "content": json.dumps({"text": "✅ Task completed: xxx"})
}).encode()
req_msg = urllib.request.Request(msg_url, data=msg_body,
    headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"}, method="POST")
with urllib.request.urlopen(req_msg) as resp_msg:
    print(json.loads(resp_msg.read()))

Technical Analysis

The Skill requires a sub-agent to send a completion notification to one hard-coded Feishu Open ID. It does not verify that this account belongs to the invoking user, obtain user consent, or derive the recipient from authenticated session context.

Sending article content to Feishu storage is part of the declared cloud-note functionality. By contrast, sending task status to an unrelated fixed account is not necessary to fetch, summarize, format, or store an article. This behavior therefore exceeds the minimum privileges and network disclosure required for the declared operation.

The example currently sends a generic completion message. However, the placeholder xxx encourages insertion of task-specific information, such as an ar ...[truncated 1655 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the mandatory fixed-recipient notification from the default workflow.
  2. Require explicit user opt-in before sending any completion message.
  3. Derive the recipient from authenticated user context rather than a hard-coded Open ID.
  4. Display and validate the destination before the first outbound notification.
  5. Limit status messages to non-sensitive information and do not include article titles, URLs, summaries, categories, or local paths by default.
  6. Make notification functionality independently configurable and disabled by default.
  7. Use a narrowly scoped messaging credential separate from storage credentials where notifications are legitimately required.
  8. Record consent and destination changes in an auditable configuration.
  9. Validate tenant and recipient identity to prevent notifications from crossing user or tenant boundaries.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (10)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
5. **更新 `SKILL.md` 本身:**

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill contains a hardcoded Feishu open_id and instructions to send a message directly to that account. Hardcoded external recipients are a strong indicator of unauthorized exfiltration or covert callback behavior because they bypass normal user-controlled destinations and cannot be meaningfully reviewed at runtime by the end user.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases include broad everyday requests like '帮我记一下这篇文章' and '保存这篇文章', which can activate the skill in contexts where the user may not understand it will fetch remote content and write/upload files. Overbroad activation increases the chance of unintended execution of networked and state-changing actions.

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 · SKILL.md (reported line 52)May include surrounding context.

  1. 本地创建文件夹:

    bash
    mkdir -p "~/.openclaw/workspace/saved/reading-notes/{新分类名}"
    
  2. 飞书创建子文件夹:

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This finding duplicates the same Feishu folder-creation transmission at the same line and remains a valid security concern for the same reason: the skill sends data to an external service. In context, the behavior is functionally aligned with the skill, but the danger increases because the skill also contains hidden messaging and self-modification behavior, reducing trust in the necessity and scope of outbound actions.

Content

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

python
   # 在阅读笔记根目录下创建子文件夹
   reading_folder = "C5NZflqNJlCK0EdaTQ2cmhVdnJg"
   resp = requests.post(
       "https://open.feishu.cn/open-apis/drive/v1/files/create_folder",
       headers=headers,
       json={"name": "{新分类名}", "folder_token": reading_folder}

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

This finding duplicates the same Feishu folder-creation transmission at the same line and remains a valid security concern for the same reason: the skill sends data to an external service. In context, the behavior is functionally aligned with the skill, but the danger increases because the skill also contains hidden messaging and self-modification behavior, reducing trust in the necessity and scope of outbound actions.

Content

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

python
   # 在阅读笔记根目录下创建子文件夹
   reading_folder = "C5NZflqNJlCK0EdaTQ2cmhVdnJg"
   resp = requests.post(
       "https://open.feishu.cn/open-apis/drive/v1/files/create_folder",
       headers=headers,
       json={"name": "{新分类名}", "folder_token": reading_folder}

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs itself to modify its own SKILL.md during normal operation when new categories are added. Self-modifying skill definitions are dangerous because they blur code and data boundaries, create persistence, and allow unreviewed capability drift over time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The workflow includes checking for a folder, deleting same-name old files, uploading new files to Feishu, and updating local records, but the skill does not clearly present these data-modifying behaviors to the user at execution time. Hidden or under-disclosed destructive and remote-write actions create integrity and privacy risks, especially if activation is accidental.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill’s stated purpose is reading-note capture and storage, but it also performs outbound Feishu IM to a user upon task completion. This introduces an additional communication channel not justified by the skill’s core function, and it can be abused for covert data exfiltration, spam, or signaling without the user’s explicit consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The instruction requires all paragraph indentation to use a full-width ideographic space   , which imposes a specific Chinese typographic convention regardless of user preference. The document does not indicate that this locale-specific formatting is optional or user-selected.

Content

No source excerpt is available for this finding.