Back to skill

Security audit

飞书文档

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a Feishu/Lark document conversion aid, but it asks for broad read, write, and command-execution authority without tight scope or clear user control.

Install only if you are comfortable granting this skill broad local file access and possible command execution. Use it in a sandbox or limited workspace, provide only the Markdown/documents intended for Feishu, avoid sensitive content unless necessary, and do not run it with administrator privileges.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:22
Finding

Excessive Tool Permissions and Privilege-Elevation Guidance

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 22–25; related behavior descriptions at lines 302 and 314
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

yaml
tools:
- read
- exec
- write

Technical Analysis

The skill declares filesystem reading, filesystem writing, and command-execution capabilities even though its documented primary function is converting Markdown into Feishu Block structures. That conversion does not inherently require arbitrary system-command execution or unrestricted filesystem access.

The risk is reinforced by later documentation that advertises system-command execution and recommends elevated execution when permissions are insufficient. The project provides no executable implementation, command allowlist, argument validation rules, path restrictions, or enforceable sandbox policy demonstrating that these powerful capabilities are constrained.

This violates the principle of least privilege. In an agent environment that grants tools based on this declaration, untrusted document content or workflow parameters could reach unnecessarily powerful operations. No concrete malicious command, automatic elevation mechanism, or active exploit was found, so this is classified as a medium-risk permission-design issue rather than confirmed malicious execution.

Attack Path

  1. An agent loads the skill and grants the declared read, write, and exec capabilities.
  2. An attacker supplies crafted Markdown, a malicious file path, or workflow parameters containing command-like or path-manipulation content.
  3. The agent uses the broadly declared tools while processing that attacker-controlled input.
  4. If command arguments or file paths are not strictly validated by the hosting agent, the input may influence command execution or filesystem operations.
  5. During troubleshooting, the documented privilege-elevation recommendation may lead a ...[truncated 968 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove exec from the declared tools unless command execution is essential to a specifically documented feature.
  2. Remove write if the skill only needs to return generated Feishu Block JSON to the caller.
  3. If file access is necessary, restrict reads and writes to caller-approved input files and a dedicated output directory.
  4. Remove the recommendation to run the workflow as an administrator. Permission failures should instead be resolved by granting narrowly scoped access to the required file or directory.
  5. If command execution is retained, define an exact executable and subcommand allowlist rather than accepting arbitrary shell commands.
  6. Pass validated arguments directly to process APIs without invoking a shell, and prohibit command interpolation, redirection, pipelines, and user-controlled environment variables.
  7. Canonicalize and validate all paths, reject traversal outside approved directories, and prevent following untrusted symbolic links.
  8. Run the skill as a dedicated non-privileged account in an enforceable sandbox with network and filesystem restrictions.
  9. Require explicit user approval before every command execution or write outside the designated workspace.
  10. Add tests covering command injection, path traversal, symbolic-link attacks, unsafe overwrite behavior, and attempted access outside approved directories.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The activation guidance is so broad that the skill could be selected for many unrelated file-processing, conversion, or content-extraction tasks. Overbroad invocation criteria increase the chance of accidental use in contexts involving sensitive files or operations the user did not intend to delegate to this skill.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is presented as a Markdown-to-Feishu document conversion/writing tool, but the documentation introduces unrelated messaging, callback, archiving, and queueing capabilities. This scope expansion can mislead users and agents about what actions the skill may take, increasing the chance of unintended data transmission or unauthorized workflow use.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

A document-conversion skill should not ambiguously describe command execution and shell-command controls unless that behavior is essential and tightly bounded. Mentioning command execution in this context normalizes higher-risk behavior and may cause an agent or operator to permit local execution beyond what is necessary for Markdown-to-Feishu transformation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The feature list broadens the skill from document conversion into general file handling, external API access, and command execution. In agent environments, this kind of overbroad capability description can trigger the skill for unrelated tasks and authorize risky actions such as file modification or external transmission without clear necessity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation describes file writing, API integration, and command execution without clearly warning that data may be modified locally or transmitted externally. In an agent setting, missing disclosure around write/network/exec behaviors undermines informed consent and raises the risk of unintended data exposure or system changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The description states '支持中文交互' in a way that presents Chinese interaction as the expected mode, while the document does not offer an explicit language or locale choice. For an organizational policy requiring user opt-in for language constraints, this is a natural-language locale preference that should be made optional or clearly justified.

Content

No source excerpt is available for this finding.