Back to skill

Security audit

Feishu Edge Tts

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: generates speech with Edge TTS and sends it to a configured Feishu chat, with some setup and privacy cautions users should understand.

Install this only if you are comfortable using Feishu app credentials and sending the provided text/audio through Edge TTS and Feishu. Use a low-privilege Feishu app, avoid putting secrets in shared shell history or committed files, and prefer a virtual environment or pinned dependency install for edge-tts.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
README.md:16
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:16-18` - `SKILL.md:41-44` - `SKILL.md:61-64` **Vulnerability Type**: Unverified and unpinned Python package installation **Risk Level**: Medium ### Vulnerable Code Snippets `README.md:16-18`: ```bash pip install edge-tts ``` `SKILL.md:41-44`: ```bash # Install edge-tts pip install edge-tts ``` `SKILL.md:61-64`: ```bash pip install edge-tts ``` ### Technical Analysis The installation instructions retrieve the latest available `edge-tts` package and its transitive dependencies without specifying an exact version, validating package hashes, or using a reviewed lockfile. Consequently, the code installed by users can change after the Skill itself has been audited. Python packages and their build systems can execute code during installation, while installed packages execute with the invoking user's privileges at runtime. If the upstream package, maintainer account, distribution infrastructure, or a transitive dependency is compromised, following these instructions could install malicious code. The instructions also do not recommend a virtual environment. Users may therefore install the package globally or with elevated privileges, unnecessarily increasing the potential effect of a compromised dependency. This is a supply-chain weakness rather than evidence that the current `edge-tts` package is malicious. ### Attack Path 1. An attacker compromises the upstream package, a maintainer account, or one of its unpinned transitive dependencies. 2. The attacker publishes a malicious version to the package source used by `pip`. 3. A user follows the documented `pip install edge-tts` instruction after the malicious release becomes current. 4. `pip` downloads the unverified package or dependency and may execute attacker-controlled build or installation logic. 5. The malicious component subsequently executes during installation or when the Skill invokes `edge-tts`. 6. The payload receives the privile ...[truncated 1014 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `edge-tts` and every transitive dependency to versions that have been reviewed and tested. 2. Generate a lockfile containing cryptographic hashes, such as a hash-locked `requirements.txt` produced with `pip-tools`. 3. Require hash verification during installation: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Document installation in an isolated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Do not recommend installation with `sudo`, as root, or into the system Python environment. 6. Review and update dependency pins through a controlled process that includes provenance checks, vulnerability scanning, and functional testing. 7. Keep the lockfile in the repository so the dependency set reviewed during the audit is the same dependency set installed by users. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The description says the skill is 'free' and '无需 API key', but actual use requires Feishu credentials and external API interaction to authenticate, upload media, and send messages. This mismatch is security-relevant because it can mislead users about required secrets, network behavior, and trust assumptions, causing them to provide credentials or transmit content without informed consent.

External Script Fetching

High
Category
Supply Chain
Content
echo -e "${BLUE}📤 上传到飞书...${NC}"

# 获取 Token
TOKEN=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" \
  | python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
fi

# 上传文件
UPLOAD_RESULT=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/files" \
  -H "Authorization: Bearer $TOKEN" \
  -F "type=audio" \
  -F "file=@$TEMP_OPUS" \
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
echo -e "${BLUE}📤 发送语音消息...${NC}"

# 发送消息
RESULT=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"receive_id\":\"$FEISHU_CHAT_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\",\\\"duration\\\":$DURATION_MS}\"}")
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill documents shell-based behavior and operational steps but declares no tool scope or permission boundaries. This is dangerous because users and hosting platforms are not clearly informed that the skill needs shell execution and likely outbound network access, which weakens least-privilege controls and increases the chance of unintended command execution or data egress.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill does not warn that provided text may be sent to external services for speech synthesis and then delivered into a Feishu chat. This creates a privacy and data-handling risk because users may input sensitive content under the assumption that processing is local or not redistributed.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The setup instructions require Feishu application credentials via environment variables but provide no guidance on secure secret handling. This is risky because users may store secrets insecurely in shell history, shared profiles, screenshots, or logs, increasing the chance of credential leakage and subsequent unauthorized messaging or API use.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The configuration hard-codes a Chinese locale voice (`zh-CN-XiaoxiaoNeural`) as the default. This creates a language/locale policy concern because the skill appears to impose a specific locale choice without indicating user selection or opt-in.

Natural-Language Policy Violations

Medium
Confidence
85% confidence
Finding
The script's user-facing help and descriptions are entirely in Chinese, including usage, options, and status messages, with no indication that other languages are supported or that the locale restriction is intentional. This can violate language or locale policy when users are not given a choice or opt-in.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script sends user-supplied text to the external Edge TTS service to synthesize speech, but it does not clearly warn the user that the text content leaves the local environment. If users pass sensitive text, secrets, or private data, this creates an unannounced confidentiality risk through third-party transmission.

External Transmission

Medium
Category
Data Exfiltration
Content
echo -e "${BLUE}📤 上传到飞书...${NC}"

# 获取 Token
TOKEN=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
  -H "Content-Type: application/json" \
  -d "{\"app_id\":\"$FEISHU_APP_ID\",\"app_secret\":\"$FEISHU_APP_SECRET\"}" \
  | python3 -c "import sys,json; print(json.load(sys.stdin).get('tenant_access_token',''))")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
echo -e "${BLUE}📤 发送语音消息...${NC}"

# 发送消息
RESULT=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"receive_id\":\"$FEISHU_CHAT_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\",\\\"duration\\\":$DURATION_MS}\"}")
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The natural-language instructions and headings are presented entirely in Chinese, while the policy requires avoiding forced language or locale without user opt-in. Although some examples include English text, the operational documentation does not offer an alternate language or indicate that Chinese is optional.

Missing User Warnings

Low
Confidence
89% confidence
Finding
This markdown file documents setting FEISHU_APP_ID, FEISHU_APP_SECRET, and FEISHU_CHAT_ID and then sending generated audio to Feishu, which implies use of credentials and network transmission. The description provides setup and usage steps but does not include any user warning about protecting secrets, where audio/text will be sent, or privacy implications.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The natural-language instructions throughout the skill are presented only in Chinese, effectively forcing a specific language for use without any opt-in or stated regional justification. Under the policy rule, language constraints should be optional or clearly documented when intentional.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The package description is written entirely in Chinese and provides no indication that other languages are supported or that the user can choose a locale. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation.

Static analysis

No suspicious patterns detected.