Back to skill

Security audit

Lark Mention

Security checks for vulnerabilities and agentic risk

Overview

This skill is clearly for sending Lark/Feishu @mention messages, but it can post live group notifications, including bulk mentions, without clear confirmation or input safeguards.

Review this skill before installing in shared or production chats. Use it only with an authorized local bridge and bot, confirm the target chat and recipients before sending, avoid @all unless explicitly intended, and validate or escape member IDs and names before passing them to the script.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lark-mention.mjs:19
Finding

Unescaped Lark Mention Markup Injection

Content
View full analysis
`${m.name}` ).join(' '); ``` ### Technical Analysis The `sendMention` function interpolates caller-provided `open_id` and `name` values directly into Lark mention markup. Neither value is subjected to type validation, identifier-format validation, nor context-appropriate escaping. The `open_id` value is inserted into a quoted `user_id` attribute, while `name` is inserted into the markup body. Values containing quotation marks, angle brackets, or closing tags can therefore alter the generated markup structure. Depending on how the local bridge and Lark API parse the resulting message, crafted input may inject additional text or mention tags, spoof displayed member names, or cause the intended mention structure to be interpreted incorrectly. The parallel `mentions` array does not eliminate this risk because its values are also derived directly from the same untrusted member objects: ```javascript const mentions = members.map(m => ({ key: m.open_id, id: { open_id: m.open_id, id_type: 'open_id' }, name: m.name })); ``` ### Attack Path 1. An attacker gains control over, or influences, a caller-supplied entry in the `members` array. 2. The attacker supplies a crafted `open_id` containing an attribute terminator or a crafted `name` containing markup such as a closing `` tag and additional message content. 3. `sendMention` embeds these values verbatim into `fullText`. 4. The generated content is sent to the fixed local bridge at `http://localhost:18780/proactive`. 5. If the bridge or downstream Lark parser accepts the altered structure, the bot sends a manipulated message containing misleading text, malformed mentions, or unintended mention markup. Successful exploitation de ...[truncated 903 chars]
Remediation
View remediation
', '>') .replaceAll('"', '"') .replaceAll("'", '''); } const atTags = members.map(member => { const openId = validateOpenId(member.open_id); const name = escapeMarkupText(member.name); return `${name}`; }).join(' '); ``` 4. Prefer a structured bridge interface that accepts validated mention objects and constructs provider-specific markup internally. This reduces the number of components that manually generate security-sensitive markup. 5. Add tests covering quotation marks, angle brackets, closing tags, empty identifiers, non-string values, oversized input, and duplicate member identifiers. Verify that hostile input is either safely encoded or rejected before any network request is made. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

使用

bash
# curl 方式
curl -X POST http://localhost:18780/proactive \
  -H "Content-Type: application/json" \
  -d '{

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description advertises broad trigger scenarios like group @mentions, @all, and notification announcements without clearly defining activation boundaries or requiring explicit user confirmation. In an agent setting, this can cause the skill to be invoked for ordinary chat phrasing and result in unintended real-world message delivery to live Feishu groups.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The markdown does not warn users that this skill sends real messages and real @mentions into a live Feishu group. That omission increases the risk of accidental external actions, spam, or disruptive notifications because a user or agent may treat it as formatting help rather than a live messaging capability.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

使用方式

方式一:通过 curl 调用

bash
curl -X POST http://localhost:18780/proactive \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill sends chat content and member identifiers, including open_id values and names, over an HTTP request to a local bridge service without any disclosure, consent, or visible safeguards in the file. Even though the destination is localhost, this still transmits potentially sensitive conversation data and identity metadata to another process, which can be intercepted, logged, or mishandled if the local bridge is compromised or exposed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This markdown file describes a POST request to a local service carrying group IDs, member identifiers, and message text, which can affect user privacy and external system state. The README does not include any user-facing warning about handling sensitive identifiers or the fact that invoking the skill will send message content to another service.

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 instructions and usage guidance are entirely in Chinese, which implicitly forces a specific language for users without any opt-in or stated regional justification. Under the language/locale policy, a skill should either offer language choice or clearly document why a locale-specific constraint exists.

Content

No source excerpt is available for this finding.