T09 · Insecure Skill Coding Practices
- Location
references/lark-im-messages-send.md:40- Finding
Unrestricted Remote Markdown Image Retrieval
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
references/lark-im-messages-send.md:40Unrestricted Remote Markdown Image Retrieval
SKILL.md:5Unpinned Executable npm Dependency
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 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
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- 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
Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
lark-cli im +chat-messages-list --chat-id oc_xxx
lark-cli im +threads-messages-list --thread omt_xxx
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.
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.
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.
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.
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.
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.
> **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.
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.
> **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.
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.
> **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.
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.
> **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.
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.
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.
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.
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.