Back to skill

Security audit

Voice Message

Security checks for vulnerabilities and agentic risk

Overview

The skill is broadly aligned with voice-message sending, but it needs review because it handles chat credentials and private message text with weak scoping and disclosure.

Review before installing. Use it only for explicit voice-message tasks, avoid passing Feishu tenant tokens on the command line, prefer environment variables or a secret manager, verify the recipient and platform before sending, and do not convert sensitive text unless you accept that TTS and chat APIs may receive the content.

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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/send_feishu_voice.sh:3
Finding

Feishu Tenant Access Token Exposed Through Command-Line Arguments

Content
View full analysis
[receive_id_type] # receive_id_type: open_id (default), chat_id, user_id, union_id, email set -e OGG_FILE="$1" RECEIVE_ID="$2" TOKEN="$3" ``` The corresponding invocation documented in `SKILL.md:49` is: ```bash scripts/send_feishu_voice.sh /tmp/voice.ogg [receive_id_type] ``` ### Technical Analysis The Feishu tenant access token is supplied as the third command-line argument and copied into the `TOKEN` shell variable. Depending on the operating system and runtime environment, command-line arguments may be exposed through process inspection facilities, diagnostic tools, audit systems, shell command history, CI/CD logs, or orchestration telemetry. Although access to another process's arguments may be restricted by operating-system policy, placing credentials in `argv` unnecessarily expands their exposure. The script only needs the credential in memory when constructing the Feishu authorization header; accepting it through a protected environment variable, file descriptor, or secret manager would reduce exposure. The script subsequently uses the credential as a bearer token: ```bash -H "Authorization: Bearer $TOKEN" ``` Possession of this token permits calls to Feishu APIs within the permissions granted to the associated application. ### Attack Path 1. A user invokes the documented command and supplies a valid tenant access token as the third argument. 2. While the process is active, a local user or monitoring component with sufficient visibility inspects the process command line. Alternatively, the command is retained in shell history, CI logs, or execution telemetry. 3. The observer extracts the tenant access token. 4. Th ...[truncated 619 chars]
Remediation
View remediation
&2 exit 1 fi ``` - Update `SKILL.md` so examples do not place secrets directly in command lines. - Prevent commands containing secrets from being written to shell history or CI/CD logs. - Ensure secret values are redacted from diagnostic output. - Grant the Feishu application only the API scopes needed to upload and send audio messages. - Rotate or revoke any token suspected of having been logged or exposed. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/send_feishu_voice.sh:42
Finding

Unescaped User-Controlled Values Used to Construct Feishu JSON Request

Content
View full analysis
Remediation
View remediation
&2 exit 1 ;; esac ``` - Use `curl --fail-with-body --show-error` and validate the Feishu response status so malformed or rejected requests fail clearly. ]]>

T08 · Insecure Dependencies

Note
Location
SKILL.md:18
Finding

Unpinned Third-Party Text-to-Speech Dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The script's behavior is limited to local text-to-speech generation and audio conversion: it takes text, synthesizes speech to a temporary MP3 via edge-tts, converts it to OGG/Opus with ffmpeg, and writes the output file. While this supports part of the declared implementation detail (audio generation/conversion), it does not perform the core declared function of sending voice messages across channels. There is also no code implementing any Feishu/Lark-specific handling. Therefore, the description materially overstates the code's actual capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a full voice-message delivery skill with TTS and cross-platform sending capabilities. The supplied code chunk does not send anything, does not call edge-tts, and does not contain any messaging-platform integration. Instead, it analyzes an input OGG file with ffprobe/ffmpeg and produces duration plus a base64 waveform JSON payload, apparently as a supporting utility for Discord voice messages. This is a materially narrower and different behavior than the declared primary purpose, so it is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a broad cross-platform voice-message skill with TTS generation and audio conversion capabilities. The supplied code chunk only handles Feishu/Lark, and only for uploading and sending an already-created OGG/Opus audio file. While the Feishu-specific part of the description is directionally aligned, the broader claims about Telegram, Discord, Signal, WhatsApp, edge-tts, and ffmpeg-based conversion are not represented in this code. This is a material description-to-behavior mismatch because the primary implemented capability is narrower and different from the declared end-to-end TTS-and-send functionality.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · scripts/send_feishu_voice.sh (reported line 24)May include surrounding context.

sh
DURATION_MS=$(python3 -c "print(int(float('$DURATION_SEC') * 1000))")

# 2. Upload file to Feishu
UPLOAD_RESP=$(curl -s -X POST "$API_BASE/im/v1/files" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file_type=opus" \
  -F "file_name=voice.ogg" \

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents use of shell-executed scripts (scripts/gen_voice.sh, scripts/send_feishu_voice.sh, python3 scripts/gen_waveform.py) but declares no explicit tool scope or allowed-tools boundary. In an agent environment, undeclared shell capability increases the chance the skill can invoke command execution unexpectedly, making downstream abuse or accidental overreach more likely.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The invocation description is broad enough to match many ordinary user requests involving audio or voice delivery, which can cause an agent to select this skill in contexts where shell execution and external messaging actions were not intended. In a skill that can generate files and send messages across channels, overbroad routing increases the risk of unintended data disclosure or action on the wrong platform.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends arbitrary input text to edge-tts, which relies on an external service, but gives no disclosure, consent prompt, or indication that message contents leave the local environment. If users pass sensitive chat content, secrets, or personal data, this can cause unintended data exposure to a third party. In a cross-channel voice-messaging skill, that risk is more significant because the text being converted may often be private user communications.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/gen_waveform.py (reported line 21)May include surrounding context.

python
ogg_file = sys.argv[1]

    # Get duration
    result = subprocess.run(
        ["ffprobe", "-v", "error", "-show_entries", "format=duration",
         "-of", "csv=p=0", ogg_file],
        capture_output=True, text=True

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/gen_waveform.py (reported line 29)May include surrounding context.

python
duration_secs = float(result.stdout.strip())

    # Extract raw PCM (mono, 16-bit, 48kHz)
    result = subprocess.run(
        ["ffmpeg", "-i", ogg_file, "-f", "s16le", "-ac", "1",
         "-ar", "48000", "-"],
        capture_output=True

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/send_feishu_voice.sh (reported line 41)May include surrounding context.

sh
echo "Uploaded: file_key=$FILE_KEY"

# 3. Send audio message
SEND_RESP=$(curl -s -X POST "$API_BASE/im/v1/messages?receive_id_type=$ID_TYPE" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"receive_id\":\"$RECEIVE_ID\",\"msg_type\":\"audio\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\"}\"}")

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language comments and default parameter set the voice to zh-CN-XiaoxiaoNeural, which imposes a specific language/locale by default. There is no accompanying justification or user-facing language choice, so this can violate locale policy expectations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.