Back to skill

Security audit

feishu-lark-cli

Security checks for vulnerabilities and agentic risk

Overview

This Lark messaging skill is mostly purpose-aligned, but it installs an unpinned executable CLI and grants broad chat-reading and chat-changing abilities that need careful review.

Install only if you trust the @larksuite/cli npm package and the Lark app credentials you will expose to it. Use the narrowest Lark scopes possible, prefer dry-run before writes, confirm recipients/content/identity before sending or mutating chats, avoid broad or exhaustive chat searches unless authorized, and be cautious with Markdown containing remote images because those URLs may be fetched and uploaded by the CLI.

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
references/lark-im-messages-send.md:40
Finding

Unrestricted Remote Markdown Image Retrieval

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:5
Finding

Unpinned Executable npm Dependency

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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (18)

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 · references/lark-im-messages-reply.md (reported line 221)May include surrounding context.

md
- When using `--video`, `--video-cover` is required as the video cover
- `--dry-run` uses placeholder image keys for remote Markdown images and placeholder media keys for local uploads
- Failures return an error code and message
- `--as user` uses a user access token (UAT) and requires the `im:message.send_as_user` and `im:message` scopes; the message is sent as the authorized end user
- `--as bot` uses a tenant access token (TAT) and requires the `im:message:send_as_bot` scope
- When sending as a bot, the app must already be in the target group or already have a direct-message relationship with the target user

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 · references/lark-im-messages-reply.md (reported line 222)May include surrounding context.

md
- When using `--video`, `--video-cover` is required as the video cover
- `--dry-run` uses placeholder image keys for remote Markdown images and placeholder media keys for local uploads
- Failures return an error code and message
- `--as user` uses a user access token (UAT) and requires the `im:message.send_as_user` and `im:message` scopes; the message is sent as the authorized end user
- `--as bot` uses a tenant access token (TAT) and requires the `im:message:send_as_bot` scope
- When sending as a bot, the app must already be in the target group or already have a direct-message relationship with the target user

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 · references/lark-im-messages-send.md (reported line 221)May include surrounding context.

md
- When using `--video`, `--video-cover` is required as the video cover
- `--dry-run` uses placeholder image keys for remote Markdown images and placeholder media keys for local uploads
- Failures return an error code and message
- `--as user` uses a user access token (UAT) and requires the `im:message.send_as_user` and `im:message` scopes; the message is sent as the authorized end user
- `--as bot` uses a tenant access token (TAT) and requires the `im:message:send_as_bot` scope
- When sending as a bot, the app must already be in the target group or already have a direct-message relationship with the target user

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 · references/lark-im-messages-send.md (reported line 222)May include surrounding context.

md
- When using `--video`, `--video-cover` is required as the video cover
- `--dry-run` uses placeholder image keys for remote Markdown images and placeholder media keys for local uploads
- Failures return an error code and message
- `--as user` uses a user access token (UAT) and requires the `im:message.send_as_user` and `im:message` scopes; the message is sent as the authorized end user
- `--as bot` uses a tenant access token (TAT) and requires the `im:message:send_as_bot` scope
- When sending as a bot, the app must already be in the target group or already have a direct-message relationship with the target user

Context Leakage

High
Category
Data Exfiltration
Confidence
75% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

Scanner excerpt · references/lark-im-threads-messages-list.md (reported line 79)May include surrounding context.

Step 1: Fetch group messages and find one that contains thread_id

lark-cli im +chat-messages-list --chat-id oc_xxx

Step 2: Extract thread_id from the JSON output and fetch thread replies

lark-cli im +threads-messages-list --thread omt_xxx

text

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes sending/replying, searching chat history, managing group members, uploading/downloading files, and managing reactions. But this skill file also exposes APIs for recalling messages, forwarding and merge-forwarding messages, querying message read-users, and creating/deleting/listing pinned messages, which are materially broader IM operations than the manifest states.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This skill enables externally impactful actions such as sending messages, modifying chats, adding/removing members, downloading files, and other communication-affecting operations, but it does not present an explicit user-facing warning or confirmation model at the description layer. In an agent context, that increases the risk of unintended outbound communication, privacy-impacting data access, or destructive chat operations being triggered without the user appreciating the consequences.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This skill enables retrieval of full conversation histories, which can expose sensitive personal, business, or regulated data, yet it does not prominently warn operators to verify authorization, necessity, and privacy implications before use. Because the command is optimized for easy message inspection across group chats and direct messages, an agent could over-collect or disclose chat content beyond the user's legitimate need.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill explicitly enables batch retrieval of full message contents and sender identities, which are inherently sensitive communications data, but it does not include a clear privacy warning, authorization check reminder, or usage boundary for handling personal or confidential content. In an agent setting, this omission can normalize broad access to private conversations and increase the risk of over-collection, unnecessary disclosure, or misuse of message data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation states that --markdown always becomes a post payload with a single zh_cn locale. This is a natural-language locale policy concern because it imposes a specific locale on generated content without describing user choice or opt-in.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lark-im-messages-reply.md (reported line 214)May include surrounding context.

md
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.

Search Feishu messages across conversations. This shortcut automatically performs a multi-step workflow: search for message IDs, batch fetch message details, then enrich the results with chat context.

> **User identity only** (`--as user`). Bot identity is not supported.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lark-im-messages-search.md (reported line 5)May include surrounding context.

md
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.

Search Feishu messages across conversations. This shortcut automatically performs a multi-step workflow: search for message IDs, batch fetch message details, then enrich the results with chat context.

> **User identity only** (`--as user`). Bot identity is not supported.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lark-im-messages-search.md (reported line 92)May include surrounding context.

md
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.

Search Feishu messages across conversations. This shortcut automatically performs a multi-step workflow: search for message IDs, batch fetch message details, then enrich the results with chat context.

> **User identity only** (`--as user`). Bot identity is not supported.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/lark-im-messages-send.md (reported line 214)May include surrounding context.

md
> **Prerequisite:** Read [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) first to understand authentication, global parameters, and safety rules.

Search Feishu messages across conversations. This shortcut automatically performs a multi-step workflow: search for message IDs, batch fetch message details, then enrich the results with chat context.

> **User identity only** (`--as user`). Bot identity is not supported.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly supports searching messages across conversations, fetching full message bodies in batch, and enriching them with chat context, but it does not pair this capability with an explicit privacy/minimization warning. That increases the risk that an agent or user will over-collect sensitive chat data, including private discussions, attachments metadata, and participant context, beyond what is necessary for the stated task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The guidance to 'always paginate exhaustively' for summaries encourages systematic collection of all matching messages without balancing that advice with data-minimization or consent considerations. In a messaging context, exhaustive pagination can materially increase exposure of sensitive or irrelevant content and makes mass extraction for profiling, surveillance, or overbroad reporting easier.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file explicitly says markdown content is always wrapped as a post payload with a single zh_cn locale. This is a language/locale constraint presented as fixed behavior, and the document does not offer user opt-in, alternatives for locale selection within this path, or justify the restriction as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document includes a raw delete operation for message reactions without any warning that it is destructive or guidance to confirm user intent before invoking it. In an agent skill context, this increases the chance of unintended state-changing actions against chat content, especially if the agent translates ambiguous user requests directly into API calls.

Content

No source excerpt is available for this finding.