T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned Global Installation of a Third-Party CLI Package
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it advertises, but it can automatically generate and send audio to Feishu, reads local Feishu credentials, and contains a real local code-injection bug in its credential-loading path.
Review before installing. Use only in chats where users have opted in, disable no-mention auto-triggering or require confirmation before generating/sending, avoid running the npm install with elevated privileges, provide Feishu credentials through a controlled secret path, and fix the OPENCLAW_CONFIG parsing bug before use.
SKILL.md:25Unpinned Global Installation of a Third-Party CLI Package
scripts/send_feishu_audio.sh:36Python Code Injection Through OPENCLAW_CONFIG Path Interpolation
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
start = time.time()
try:
resp = requests.post(url, json=payload, headers=headers, timeout=300)
data = resp.json()
except Exception as e:
print(f"❌ Request failed: {e}", file=sys.stderr)
The declared purpose presents a benign mood-music assistant, but the documented behavior also includes external API use, local file creation, local playback, and credential-dependent message delivery. This mismatch can mislead operators and users about what the skill actually does, undermining informed consent and making risky actions more likely to be auto-approved.
The declared purpose presents a benign mood-music assistant, but the documented behavior also includes external API use, local file creation, local playback, and credential-dependent message delivery. This mismatch can mislead operators and users about what the skill actually does, undermining informed consent and making risky actions more likely to be auto-approved.
The implicit trigger rules are broad enough that normal conversational phrases can activate the skill without a clear user request. In group chat, this can cause unwanted API calls, message sending, audio generation costs, and repeated unsolicited interactions affecting multiple users.
Fully implicit auto-triggering on extreme emotion phrases is especially risky because such phrases can appear casually, sarcastically, or in quoted text. The skill is configured to act without mention or confirmation, which makes unintended activation and unsolicited outbound messaging substantially more likely.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
message="<共情文案>")
**方式 3:手动 curl 两步流程**(理解原理用)
```bash
# ⚠️ 关键坑:file_type 必须填 opus(不是 mp3),否则报 234001
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
message="<共情文案>")
**方式 3:手动 curl 两步流程**(理解原理用)
```bash
# ⚠️ 关键坑:file_type 必须填 opus(不是 mp3),否则报 234001
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
[[ -f "$TMP_FILE" ]] || { echo "❌ File not found: $TMP_FILE" >&2; exit 1; }
fi
# --- 3. Get tenant access token ---
echo "🔑 Getting Feishu token..."
TOKEN=$(curl -sf -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.
# --- 3. Get tenant access token ---
echo "🔑 Getting Feishu token..."
TOKEN=$(curl -sf -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\"}" \
| python3 -c "import sys,json; r=json.load(sys.stdin); print(r['tenant_access_token']) if r.get('code')==0 else sys.exit(r.get('msg','auth failed'))")
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# --- 4. Upload file (file_type=opus is required for audio messages) ---
echo "📤 Uploading to Feishu..."
UPLOAD_RESP=$(curl -sf -X POST "https://open.feishu.cn/open-apis/im/v1/files" \
-H "Authorization: Bearer $TOKEN" \
-F "file_type=opus" \
-F "file_name=voice.opus" \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# --- 5. Send audio message (msg_type=audio) ---
echo "📨 Sending audio message..."
SEND_RESP=$(curl -sf -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\": \"$CHAT_ID\", \"msg_type\": \"audio\", \"content\": \"{\\\"file_key\\\": \\\"$FILE_KEY\\\"}\"}")
The skill requires shell execution, environment-variable access, and network access, but it does not declare any explicit tool scope or permission boundaries. In an agent environment, this increases the chance of over-privileged execution, making credential exposure, unintended command execution, and external data transmission easier than necessary.
The skill describes automatic local playback and automatic message sending, but does not present these as prominent consent-gated side effects. Hidden or weakly disclosed side effects are dangerous because users may think they are only asking for recommendations while the skill is actually executing commands and posting to chats.
The skill performs local environment probing and may automatically launch local audio players, which are system-affecting actions beyond the core promise of sending music to Feishu. Automatic local execution can surprise users, disrupt host systems, and widen the attack surface through shell-invoked utilities.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
| python3 -c "import sys,json; print(json.load(sys.stdin)['data']['file_key'])")
# Step 2: 发送音频消息(msg_type=audio)
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\":\"$CHAT_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\"}\"}"
The optional mood-history log stores sensitive emotional data and preferences over time, but the file does not define clear consent, retention, or deletion controls. Emotional-state history is sensitive personal data, and retaining it without explicit notice can create privacy harm if accessed, shared, or repurposed.
The skill explicitly instructs retention of users' emotional history and preferences in plain-language local storage. Persistent accumulation of sensitive user-state data increases privacy and insider-risk exposure, especially when the data is readable and semantically rich rather than minimized or anonymized.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print("❌ MINIMAX_API_KEY not set", file=sys.stderr)
sys.exit(1)
url = "https://api.minimaxi.com/v1/music_generation"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
start = time.time()
try:
resp = requests.post(url, json=payload, headers=headers, timeout=300)
data = resp.json()
except Exception as e:
print(f"❌ Request failed: {e}", file=sys.stderr)
The manifest describes a skill that detects mood, generates matching music, and sends it to a Feishu group. While sending to Feishu is expected, this script additionally searches environment variables and a local OpenClaw config file for app credentials, which is a broader secret-reading capability not stated in the skill purpose.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# --- 3. Get tenant access token ---
echo "🔑 Getting Feishu token..."
TOKEN=$(curl -sf -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\"}" \
| python3 -c "import sys,json; r=json.load(sys.stdin); print(r['tenant_access_token']) if r.get('code')==0 else sys.exit(r.get('msg','auth failed'))")
The script sends user-provided text or audio content and the destination chat ID to external Feishu APIs, but there is no explicit consent prompt, privacy notice, or guardrail around what sensitive content may be transmitted. In a mood-detection skill, inputs may contain highly personal emotional or crisis-related statements, which makes silent onward transmission more privacy-sensitive than a generic bot integration.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# --- 5. Send audio message (msg_type=audio) ---
echo "📨 Sending audio message..."
SEND_RESP=$(curl -sf -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\": \"$CHAT_ID\", \"msg_type\": \"audio\", \"content\": \"{\\\"file_key\\\": \\\"$FILE_KEY\\\"}\"}")
The fallback to reading Feishu credentials from a local config file introduces credential-access behavior not obvious from the user-facing description. Even if intended for convenience, implicit credential discovery expands what the skill can access and increases the risk of accidental secret exposure or misuse.
The script downloads remote content and writes it directly to a user-specified path without validating the destination or preventing overwrite of sensitive files. In an agent/automation context, if an attacker can influence --output, they may cause arbitrary file overwrite within the permissions of the running process, which can damage data or affect later execution.