T08 · Insecure Dependencies
- Location
scripts/mimo_tts.py:25- Finding
Automatic Installation of an Unpinned Runtime Dependency
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s text-to-speech purpose is coherent, but it automatically installs an unpinned Python package at runtime, which users should review before installing.
Review this skill before installing. It appears to perform the advertised Xiaomi MiMo TTS task, but install requests through your normal trusted dependency process first and avoid running the script in an environment where it can auto-install packages. Use MIMO_API_KEY rather than --api-key when possible, and do not send confidential, regulated, or secret text unless you are comfortable sharing it with the Xiaomi MiMo API and storing the generated audio file locally.
scripts/mimo_tts.py:25Automatic Installation of an Unpinned Runtime Dependency
scripts/mimo_tts.py:166API Key Exposure Through Command-Line Arguments
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_api_key(cli_key: str = None) -> str:
"""Get API key from CLI arg or MIMO_API_KEY env var."""
if cli_key:
return cli_key
key = os.environ.get("MIMO_API_KEY")
The skill documentation instructs users to send arbitrary input text to Xiaomi's external API and save the generated audio to a local file, but it does not clearly warn about the privacy and data-handling implications. This can lead users or downstream agents to transmit sensitive text off-device and persist potentially sensitive spoken content locally without informed consent or clear disclosure.
The skill is explicitly designed to communicate with an external service at api.xiaomimimo.com, which means user-provided text leaves the local environment and is exposed to third-party processing. In a TTS skill this behavior is expected, but it still creates confidentiality and compliance risk if users provide sensitive content without a clear disclosure or policy controls.
## API Details
- **Platform**: https://platform.xiaomimimo.com
- **Base URL**: `https://api.xiaomimimo.com/v1`
- **Endpoint**: `/v1/chat/completions` (NOT `/audio/speech`)
- **Model**: `mimo-v2-tts`
- **Auth**: Bearer Token via `MIMO_API_KEY` env var
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""
Xiaomi MiMo-V2-TTS - Text-to-Speech synthesis script.
API: https://api.xiaomimimo.com/v1/chat/completions
Model: mimo-v2-tts
MiMo TTS uses Chat Completions format with special requirements:
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""
Xiaomi MiMo-V2-TTS - Text-to-Speech synthesis script.
API: https://api.xiaomimimo.com/v1/chat/completions
Model: mimo-v2-tts
MiMo TTS uses Chat Completions format with special requirements:
Auto-installing a package from inside a TTS script is unnecessary and dangerous because it triggers network access and package execution as a side effect of running the tool. If the package source, environment, or dependency chain is compromised, the script can facilitate unintended code execution.
The script automatically executes pip via subprocess when requests is missing, causing code installation and execution at runtime without user confirmation. This expands the trust boundary to package indexes and the local Python environment, creating supply-chain and unexpected code-execution risk that is unrelated to core TTS functionality.
import requests
except ImportError:
import subprocess
subprocess.check_call([sys.executable, "-m", "pip", "install", "requests", "-q"])
import requests
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print(f" Format: {response_format}")
try:
resp = requests.post(url, headers=headers, json=payload, timeout=120)
if resp.status_code == 200:
data = resp.json()