Back to skill

Security audit

Feishu Edge TTS Voice

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims, but it sends user text and audio through external services using stored Feishu credentials with limited scoping and some unsafe credential handling.

Review this skill before installing. It is not clearly malicious, but use it only if you are comfortable sending message text to Microsoft Edge TTS and Feishu, letting it read Feishu app credentials from your OpenClaw config, and allowing it to send Feishu messages on your behalf. Prefer scoped Feishu credentials, avoid sensitive text, and consider pinning dependencies and replacing curl token-in-arguments before production use.

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
scripts/send_voice.py:31
Finding
Feishu Tenant Access Token Exposed Through Process Arguments## Vulnerability Details **File Location**: `scripts/send_voice.py`, lines 31-39 **Vulnerability Type**: Sensitive credential exposure through subprocess arguments **Risk Level**: Medium ### Vulnerable Code ```python def upload_file(token, opus_path): # Upload with curl because multipart handling is more complex in pure Python result = subprocess.run([ "curl", "-s", "-X", "POST", f"{FEISHU_API}/im/v1/files", "-H", f"Authorization: Bearer {token}", "-F", "file_type=opus", "-F", "file_name=voice.opus", "-F", f"file=@{opus_path}" ], capture_output=True, text=True) ``` ### Technical Analysis The Feishu tenant access token is interpolated directly into the command-line arguments supplied to `curl`. Although `subprocess.run` uses an argument array and does not invoke a shell, the resulting `curl` process still contains the complete bearer token in its process argument vector. Depending on operating-system process visibility and host configuration, another local user, monitoring agent, diagnostic utility, or compromised process may read the command line through process-listing tools or interfaces such as `/proc/<pid>/cmdline`. The exposure lasts for the duration of the upload process. Using an argument array prevents shell command injection, but it does not protect secrets placed in process arguments. Passing the authorization header this way therefore exceeds minimum safe credential-handling requirements. ### Attack Path 1. An authorized invocation of the Skill reads the Feishu application credentials and obtains a tenant access token. 2. The Skill starts `curl` with `Authorization: Bearer <token>` in its process arguments. 3. A local attacker or compromised monitoring process observes running processes while the audio upload is in progress. 4. The attacker reads the `curl` argument vector and extracts the bearer token. 5. Before the token expires, the attacker submits requests directly t ...[truncated 703 chars]
Remediation
## Remediation Suggestions 1. Replace the `curl` subprocess with an in-process HTTP implementation supporting multipart uploads, such as a reviewed and pinned Python HTTP client. Set the authorization header in the client request so the token never appears in a child process argument vector. 2. If `curl` must be retained, provide sensitive headers through a protected temporary configuration file or standard input rather than command-line arguments. Create any temporary file with owner-only permissions and delete it immediately after use. 3. Avoid printing or logging authorization headers, application secrets, access tokens, or complete request objects. 4. Check the subprocess return code before parsing its output and handle malformed or unsuccessful API responses without exposing credentials. 5. Grant the Feishu application only the scopes required to upload audio and send messages. 6. Rotate or invalidate potentially exposed credentials and tokens if process command lines may have been collected by untrusted monitoring or diagnostic systems.

T08 · Insecure Dependencies

Note
Location
SKILL.md:47
Finding
Unpinned Third-Party TTS Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 47-52 **Vulnerability Type**: Mutable and unverified third-party dependency **Risk Level**: Low ### Vulnerable Documentation ```bash pip install edge-tts # one-time installation # ffmpeg is normally preinstalled; otherwise: yum install ffmpeg / apt install ffmpeg ``` ### Technical Analysis The installation instructions retrieve the latest available `edge-tts` release without pinning a reviewed version or verifying package integrity with a cryptographic hash. The package installed in the future may therefore differ from the implementation that was available when the Skill was audited. Python packages can execute code during installation or when imported. In this project, `edge_tts` is imported and used at runtime to process the complete user-supplied message text. A compromised package repository, compromised maintainer account, or malicious future package release could consequently execute code with the privileges of the user running the Skill. This finding concerns supply-chain hardening. The audit found no evidence that the currently intended `edge-tts` package is malicious. ### Attack Path 1. An attacker compromises the relevant package publication account or distribution channel, or causes a malicious future release to be published under the expected package name. 2. A user follows the documented command after that release becomes the default version. 3. `pip` downloads and installs the mutable latest release without an expected version or hash check. 4. Malicious package code executes during installation or when `send_voice.py` imports and invokes `edge_tts`. 5. The code runs with the privileges of the user who installed or executed the Skill and may access data available to that account. ### Impact Assessment If the dependency distribution channel is compromised, malicious code could obtain the invoking user's local privileges. Its potential reach could include user-readable files, e ...[truncated 400 chars]
Remediation
## Remediation Suggestions 1. Pin `edge-tts` to a reviewed version rather than installing an unconstrained latest release. 2. Maintain a lock file or requirements file containing cryptographic hashes, and install with hash verification, for example through `pip --require-hashes`. 3. Review dependency updates before changing the pinned version and use automated vulnerability monitoring. 4. Install dependencies inside a dedicated virtual environment under a non-privileged account. 5. Document that Edge TTS is an external cloud service and that message text is transmitted for speech generation. 6. Where feasible, isolate the TTS component from unrelated credentials and sensitive local files so a compromised dependency has access only to the data necessary for speech generation.
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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (10)

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill advertises and demonstrates shell execution and external network use, but does not declare any tool scope or permissions boundaries. That omission makes it harder for a host agent or user to understand what capabilities will be exercised, increasing the risk of unexpected command execution or data transmission when the skill is triggered.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The activation description is broad enough to match ordinary requests such as asking for a spoken reply or TTS output, which could cause the skill to trigger more often than a user expects. In this skill, accidental activation is more significant because activation leads to shell commands and sending user content to third-party services.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The description says the skill uses Edge TTS and sends Feishu voice messages, but it does not clearly warn that the user's content will be transmitted to external services for synthesis and delivery. Because the skill handles arbitrary message text, this can expose sensitive or private content to third parties without informed consent.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The description sets the default voice to zh-CN-YunxiNeural and presents the skill as using a Chinese voice by default, but it does not state that users can choose language/locale at activation time. Under the policy, forcing a specific language or locale without opt-in can be a natural-language policy violation unless clearly justified.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
def upload_file(token, opus_path):
    # 用 curl 上传(multipart 在纯 Python 略繁琐)
    result = subprocess.run([
        "curl", "-s", "-X", "POST",
        f"{FEISHU_API}/im/v1/files",
        "-H", f"Authorization: Bearer {token}",
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Context-Inappropriate Capability

Medium
Confidence
82% confidence
Finding
The manifest describes a Feishu voice-message skill that generates speech with Edge TTS and sends it as a Feishu audio message. While audio conversion is expected, implementing it by spawning external binaries (`curl` here, and similarly `ffmpeg` later) adds process-execution capability not justified or disclosed by the stated purpose, increasing the skill's operational power beyond a typical API-only sender.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The script sends the full input text to Microsoft Edge TTS, which is an external network service, without any explicit warning, consent, or privacy notice at the point of use. If users provide sensitive or regulated content expecting only local processing, this can cause unintended data disclosure to a third party.

subprocess module call

Medium
Category
Dangerous Code Execution
Content
asyncio.run(tts_to_mp3(args.text, args.voice, mp3_path))

        # 转换格式
        subprocess.run(
            ["ffmpeg", "-i", mp3_path, "-c:a", "libopus", opus_path, "-y"],
            capture_output=True, check=True
        )
Confidence
70% confidence
Finding
subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Missing User Warnings

Low
Confidence
88% confidence
Finding
Automatically reading Feishu app credentials from configuration without warning reduces transparency around authenticated actions performed on the user's behalf. If triggered unexpectedly, the skill can send messages using existing credentials, amplifying the impact of accidental activation or misuse.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The natural-language documentation and CLI usage text are entirely in Chinese, which imposes a specific language on users without indicating that this is an opt-in or region-specific skill. Under the policy, language constraints should either offer user choice or be clearly justified.

Static analysis

No suspicious patterns detected.