Back to skill

Security audit

lark-file-sender

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a straightforward Feishu/Lark file-sending helper, but it gives broad local-file sharing instructions without clear confirmation safeguards and includes unsafe command-string formatting.

Install only if you trust the Feishu/Lark message tool environment and are comfortable with the agent sending local files externally. Require the agent to confirm the exact file path, recipient or chat, and caption before every send, and avoid using the helper's printed command with untrusted filenames or message text.

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
check_file.py:32
Finding

Unescaped User-Controlled Values in Generated Message-Tool Command

Content
View full analysis
[optional_message]") sys.exit(1) file_path = sys.argv[1] message = sys.argv[2] if len(sys.argv) > 2 else "" info, error = check_file(file_path) if error: print(f"❌ Error: {error}") sys.exit(1) print(f"✅ File OK: {info['name']}") print(f" Size: {info['size_mb']:.2f} MB") print(f" Path: {info['path']}") print() print("Send command:") print(format_send_command(info, message)) ``` ### Technical Analysis The script incorporates the resolved file path and optional command-line message directly into a command-like string: ```python cmd = f'message action=send filePath="{file_info["path"]}"' cmd += f' message="{message}"' ``` Neither value is escaped or encoded before interpolation. An attacker-controlled message—or a path containing quotation marks, line breaks, or syntax meaningful to the consuming Agent/tool parser—can terminate the intended quoted field and introduce additional arguments or commands. The Python script prints the resulting string rather than executing it directly. Exploitation therefore depends on a user, Agent, or automation component subsequently interpreting the generated text as a trusted tool command. This usage is consistent with the helper's documented purpose, so the output may reasonably reach such a consumer. No evidence establishes direct operating-system command execution. The confirmed risk is man ...[truncated 1730 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The declared description presents a full file-sending skill for Feishu/Lark conversations, including delivery to users/groups and channel selection. The supplied code only checks a local file's existence and size, then formats and prints a generic send command string. While file path validation and message formatting are partially consistent with the description, the primary purpose is materially narrower: it is a helper/validation script rather than a functioning Feishu file sender. Key declared behavior—actual sending and recipient/channel handling—is absent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states the skill will 'automatically trigger when you mention sending files via Feishu,' which is broad and underspecified. In agent systems, vague auto-trigger conditions can cause unintended invocation on normal conversation, leading to accidental file handling or disclosure if the broader skill implementation acts on local paths or prior context without strong confirmation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Example phrases like 'Send this file to Feishu' and similar natural-language wording are generic enough to overlap with ordinary user speech. If the platform uses these examples to shape activation behavior, the skill may activate in contexts where the user is discussing files rather than intending an immediate send, increasing the risk of unintended message delivery or exposure of sensitive documents.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill encourages sending arbitrary local files to Feishu recipients but does not warn that this action transmits file contents outside the local environment. In a file-transfer skill, missing this warning increases the chance of accidental exfiltration of sensitive workspace data, especially because examples normalize sending files from local absolute paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The examples repeatedly show sending local workspace files to Feishu, including targeted delivery to a specific user, without any warning that this transmits data to an external service or that the files may contain sensitive information. In an agent environment, this omission increases the risk of unreviewed data exfiltration because users and downstream agents may treat local file transfer as routine and safe.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The example introduces exec command="python generate_csvs.py --output /workspace/csvs/", which expands the skill from file sending into arbitrary local command execution. In an agent setting, examples often shape model behavior, so this can normalize or encourage unnecessary execution of local programs before exfiltrating outputs via Feishu.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.