T09 · Insecure Skill Coding Practices
- Location
scripts/send_voice_feishu.sh:6- Finding
Python Code Injection Through the Recipient Identifier
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Feishu voice skill is not clearly malicious, but it can send audio to Feishu using a local app secret and an embedded default recipient without clear user confirmation.
Review before installing. Use only with a Feishu app and recipient IDs you control, remove the embedded default recipient and app ID, require explicit recipients and files, fix the python3 -c interpolation, avoid putting secrets in process arguments, and pin dependencies before use.
scripts/send_voice_feishu.sh:6Python Code Injection Through the Recipient Identifier
scripts/send_voice_feishu.sh:4Audio Can Be Sent to a Hard-Coded Opaque Recipient
SKILL.md:32Unpinned Third-Party Packages Are Downloaded and Executed
scripts/send_voice_feishu.sh:17Feishu App Secret Is Exposed Through Process Arguments
The documented behavior claims a bidirectional voice workflow, but the finding indicates the actual capability includes undeclared local credential access and omits major advertised functions. This mismatch is dangerous because users and reviewers may consent to a harmless-looking media utility while it performs sensitive actions such as reading secrets or sending data.
The skill instructs storage and use of a Feishu App Secret from a local credential file, which is sensitive authentication material. Accessing such a secret is inherently high-risk in an agent skill because compromise or misuse could enable unauthorized API actions, impersonation, or message sending through the linked Feishu application.
创建文件 ~/.openclaw/.credentials/feishu-app-secret.txt:
你的飞书App Secret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# 用法: send_voice_feishu.sh <音频文件.ogg> [时长毫秒] [接收者ID]
APP_ID="cli_a9037acd2ba19bb5"
APP_SECRET_FILE="${HOME}/.openclaw/.credentials/feishu-app-secret.txt"
RECEIVER_ID="${3:-ou_94f3936f1896b5378404f377da3fae6f}"
# 读取App Secret
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
FILE_PATH="${1:-/tmp/test_voice.ogg}"
DURATION="${2:-4650}"
# 获取access token
get_token() {
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
-H "Content-Type: application/json" \
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
FILE_PATH="${1:-/tmp/test_voice.ogg}"
DURATION="${2:-4650}"
# 获取access token
get_token() {
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
-H "Content-Type: application/json" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 获取access token
get_token() {
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
-H "Content-Type: application/json" \
-d "{\"app_id\": \"$APP_ID\", \"app_secret\": \"$APP_SECRET\"}")
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
local file_path="$2"
local duration="$3"
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/files" \
-H "Authorization: Bearer $token" \
-F "file_type=opus" \
-F "file_name=voice.ogg" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 使用Python构造正确的JSON
local json_payload=$(python3 -c "import json; print(json.dumps({\"receive_id\": \"$RECEIVER_ID\", \"msg_type\": \"audio\", \"content\": json.dumps({\"file_key\": \"$file_key\"})}))")
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "$json_payload")
The skill documents multiple shell-based operations (pip, npm, apt/brew, ffmpeg, CLI execution) but does not declare any explicit tool scope or permissions. This creates a trust and review gap: an agent may execute shell commands the user did not clearly authorize, including package installation or message-sending actions.
Using 'npx edge-tts' without a pinned version allows execution of whatever package version is currently resolved at runtime. If the upstream package is compromised or a breaking version is published, the skill could run untrusted code on the host.
The default voice is hard-coded to "zh-CN-YunxiNeural", which sets a specific language/locale by default. Under the policy, locale constraints should either offer user choice or be clearly documented and justified; this JSON file shows neither.
The script uploads a caller-supplied audio file to Feishu and can send it to a hard-coded default recipient without any confirmation, warning, or visibility into where the data is going. In an agent-skill context, this increases the risk of unintended exfiltration of sensitive voice content because a user may omit the recipient argument and still transmit private data externally.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 获取access token
get_token() {
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
-H "Content-Type: application/json" \
-d "{\"app_id\": \"$APP_ID\", \"app_secret\": \"$APP_SECRET\"}")
This request sends a message to Feishu using a recipient that defaults to a preconfigured open_id, which can cause silent transmission to an unintended party if the caller does not override it. In a skill context, outbound messaging is expected, but the hidden default recipient makes accidental data disclosure materially more dangerous.
# 使用Python构造正确的JSON
local json_payload=$(python3 -c "import json; print(json.dumps({\"receive_id\": \"$RECEIVER_ID\", \"msg_type\": \"audio\", \"content\": json.dumps({\"file_key\": \"$file_key\"})}))")
local response=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d "$json_payload")
The command help states the --language option defaults to zh, and elsewhere the documentation repeatedly frames the tool around Chinese-only speech/text behavior. Because the skill does not present this as an explicit user choice or a justified region-specific constraint, it appears to impose a locale default in natural-language documentation.
The script's comments, usage text, and runtime status/error messages are all in Chinese, which imposes a specific language on users. There is no indication that this is a region-specific tool or that users can opt into another language, so it appears to violate the language/locale policy criterion.
No suspicious patterns detected.