Back to skill

Security audit

Voice Translator

Security checks for vulnerabilities and agentic risk

Overview

This voice-translation skill uses expected cloud speech APIs and local phrase saving, with privacy and temp-file cautions but no hidden or destructive behavior.

Install only if you are comfortable sending recorded speech and translated text to SenseAudio and any LLM provider you configure. Avoid highly sensitive medical, financial, or private conversations unless that processing is acceptable, and treat saved favorites and generated audio files as local records that may need deletion.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:94
Finding
Predictable Temporary File Permits Symlink-Based File Overwrite## Vulnerability Details **File Location**: `SKILL.md`, lines 94–95 **Vulnerability Type**: Predictable temporary file and unsafe file creation **Risk Level**: Medium ### Vulnerable Code ```python open('/tmp/translated.mp3','wb').write(audio) subprocess.run(['play','/tmp/translated.mp3']) ``` ### Technical Analysis The documented TTS pipeline writes generated audio to a fixed path in the shared `/tmp` directory. The call to `open(..., 'wb')` follows symbolic links and does not create the file with exclusive semantics. A local attacker who can write to `/tmp` can create `/tmp/translated.mp3` as a symbolic link to another file before the pipeline runs. If the target file is writable by the user executing the example, the write operation truncates and replaces its contents with generated audio. The fixed filename also allows concurrent translator runs to overwrite or play each other's output. The example does not remove the file after playback, so translated speech remains locally accessible subject to the resulting file permissions and host configuration. ### Attack Path 1. A local attacker identifies that the user intends to run the documented TTS command. 2. The attacker creates `/tmp/translated.mp3` as a symbolic link to a file writable by that user. 3. The user runs the pipeline and receives valid audio data from the TTS API. 4. Python opens the predictable path in write mode and follows the attacker's symbolic link. 5. The linked target is truncated and overwritten with audio bytes. 6. The subsequent `play` command accesses the same attacker-controlled path. This exploitation path requires local access to the shared temporary directory and a target writable under the victim process's existing privileges. ### Impact Assessment The vulnerability does not grant privileges beyond those already held by the process. It can nevertheless let a local attacker overwrite or corrupt any file writable by the user runn ...[truncated 530 chars]
Remediation
## Remediation Suggestions - Replace the fixed path with a securely generated temporary file, preferably through `tempfile.NamedTemporaryFile`. - Create the file with restrictive permissions and exclusive creation semantics. - Pass the generated path to the player as an argument list rather than constructing a shell command. - Delete the temporary recording in a `finally` block after playback, including when playback fails. - Keep the file descriptor or file lifecycle under the process's control to minimize time-of-check/time-of-use races. - For example: ```python import os import subprocess import tempfile tmp_path = None try: with tempfile.NamedTemporaryFile( mode="wb", suffix=".mp3", prefix="senseaudio-", delete=False, ) as audio_file: audio_file.write(audio) tmp_path = audio_file.name subprocess.run(["play", tmp_path], check=True) finally: if tmp_path is not None: try: os.unlink(tmp_path) except FileNotFoundError: pass ``` - Clearly disclose that recordings and translated text are sent to the external SenseAudio service, and obtain user consent before upload.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

External Script Fetching

High
Category
Supply Chain
Content
```bash
# 英语播报
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill captures user speech and sends audio/text to external cloud APIs, but the description does not clearly warn users that potentially sensitive conversations leave the local device. In a translation skill, users may speak travel, medical, or personal content, so the lack of explicit disclosure materially increases privacy risk.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# 录制音频后上传识别(中文)
curl https://api.senseaudio.cn/v1/audio/transcriptions \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -F file="@recording.wav" \
  -F model="sense-asr" \
Confidence
93% confidence
Finding
The example uploads recorded audio to a remote ASR service. In a voice translator, this is expected, but it is still sensitive because raw speech may contain personal, financial, or medical information.

External Transmission

Medium
Category
Data Exfiltration
Content
双向模式识别外语(自动检测语言):
```bash
curl https://api.senseaudio.cn/v1/audio/transcriptions \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -F file="@foreign.wav" \
  -F model="sense-asr" \
Confidence
92% confidence
Finding
This second ASR example also uploads user speech to an external service, here in bidirectional mode with automatic language detection. That broadens the kinds of conversations likely to be captured and makes privacy disclosure even more important.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# 英语播报
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
88% confidence
Finding
The referenced endpoint is an external network destination used for TTS generation. It is not inherently malicious, but it is a true data-transfer behavior with privacy implications in this skill context.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# 英语播报
curl -X POST https://api.senseaudio.cn/v1/t2a_v2 \
  -H "Authorization: Bearer $SENSEAUDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
Confidence
88% confidence
Finding
The referenced endpoint is an external network destination used for TTS generation. It is not inherently malicious, but it is a true data-transfer behavior with privacy implications in this skill context.

External Transmission

Medium
Category
Data Exfiltration
Content
import tempfile

API_KEY = os.environ["SENSEAUDIO_API_KEY"]
ASR_URL = "https://api.senseaudio.cn/v1/audio/transcriptions"
TTS_URL = "https://api.senseaudio.cn/v1/t2a_v2"

# 场景配置
Confidence
89% confidence
Finding
Hardcoding the remote ASR URL in the implementation confirms the skill is designed to send user audio off-device. In this context the danger is not exploit code, but undisclosed third-party processing of potentially sensitive voice data.

External Transmission

Medium
Category
Data Exfiltration
Content
API_KEY = os.environ["SENSEAUDIO_API_KEY"]
ASR_URL = "https://api.senseaudio.cn/v1/audio/transcriptions"
TTS_URL = "https://api.senseaudio.cn/v1/t2a_v2"

# 场景配置
SCENES = {
Confidence
89% confidence
Finding
Hardcoding the remote TTS URL means translated text is sent to a third-party network service. Because the skill may process travel, shopping, and medical phrases, this can expose sensitive user intent or health information.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The skill description and workflow claim end-to-end voice translation with scene-aware translation, but the translate function only contains placeholder comments and raises NotImplementedError. As written, the advertised translation workflow cannot execute successfully.

External Transmission

Medium
Category
Data Exfiltration
Content
"voice_setting": {"voice_id": voice_id, "speed": 0.9},
        "audio_setting": {"format": "mp3", "sample_rate": 32000},
    }
    resp = requests.post(
        TTS_URL,
        headers={"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"},
        json=payload,
Confidence
91% confidence
Finding
This POST sends text content to an external TTS service, which is expected for the feature but still constitutes off-device data transfer. The risk is contextual: because the skill handles user speech and translated phrases, it can disclose sensitive content if users are not informed or if the provider is not trusted.

Description-Behavior Mismatch

Low
Confidence
95% confidence
Finding
The manifest description claims the skill plays back English, Japanese, and Korean speech, suggesting a narrower supported-language scope. However, the LANGUAGES table also enables French, German, and Spanish output, expanding behavior beyond what the description states.

Intent-Code Divergence

Low
Confidence
96% confidence
Finding
The support-language table states that Thai (th) and Vietnamese (vi) are supported for ASR and TTS. However, the code's LANGUAGES and LANG_NAMES mappings only include en, ja, ko, fr, de, and es, so the documented support contradicts the actual implementation.

Missing User Warnings

Low
Confidence
90% confidence
Finding
The favorites feature persists recognized and translated phrases to a local JSON file without warning users that conversation-derived content will remain on disk. This can expose sensitive travel, medical, or personal phrases to other local users, backups, or forensic recovery.

Static analysis

No suspicious patterns detected.