T09 · Insecure Skill Coding Practices
- Location
scripts/run_tts.sh:8- Finding
Arbitrary Shell Command Execution Through Unsafe Environment File Loading
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This voice-cloning skill is purpose-aligned overall, but it has under-scoped automatic installation, local service, path, and cleanup behaviors that users should review before installing.
Install only if you explicitly want local voice cloning and are comfortable with large model downloads, a background local service, unpinned third-party code installation, and handling voice samples as biometric data. Use it only with the speaker's permission, keep the service bound to 127.0.0.1, avoid untrusted .env files, and review cleanup behavior before running the uninstaller.
scripts/run_tts.sh:8Arbitrary Shell Command Execution Through Unsafe Environment File Loading
server/app.py:56Unauthenticated TTS API Accepts Arbitrary Server-Local Input and Output Paths
server/requirements.txt:1Automatic Installation of Unpinned Packages and Mutable Git Repositories
scripts/uninstall.sh:39Uninstaller Can Terminate and Delete Resources Not Owned by the Skill
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
}
try:
resp = requests.post(target_url, json=payload, timeout=timeout_sec)
resp.raise_for_status()
data = resp.json()
The skill claims consistent voice cloning from reference audio, but available backends may not all support cloning or may behave inconsistently depending on environment configuration. In a biometric context, this mismatch is risky because users and operators may believe consented cloning is happening under controlled conditions when the system may instead generate generic or incorrect audio output.
The skill claims consistent voice cloning from reference audio, but available backends may not all support cloning or may behave inconsistently depending on environment configuration. In a biometric context, this mismatch is risky because users and operators may believe consented cloning is happening under controlled conditions when the system may instead generate generic or incorrect audio output.
The skill claims consistent voice cloning from reference audio, but available backends may not all support cloning or may behave inconsistently depending on environment configuration. In a biometric context, this mismatch is risky because users and operators may believe consented cloning is happening under controlled conditions when the system may instead generate generic or incorrect audio output.
The skill claims consistent voice cloning from reference audio, but available backends may not all support cloning or may behave inconsistently depending on environment configuration. In a biometric context, this mismatch is risky because users and operators may believe consented cloning is happening under controlled conditions when the system may instead generate generic or incorrect audio output.
The skill claims consistent voice cloning from reference audio, but available backends may not all support cloning or may behave inconsistently depending on environment configuration. In a biometric context, this mismatch is risky because users and operators may believe consented cloning is happening under controlled conditions when the system may instead generate generic or incorrect audio output.
The activation guidance is broad enough to trigger on ordinary conversational or audio-related contexts, which can cause the agent to invoke a shell/network-capable skill more often than necessary. Over-broad activation increases exposure to privacy-sensitive voice data handling and unnecessary execution of auto-installing or host-modifying behavior.
Voice recordings are biometric identifiers, and the skill encourages cloning a user's voice without any warning about consent, retention, secondary use, or privacy risks. In this context, omission of consent guidance is especially dangerous because misuse can enable impersonation, fraud, and non-consensual synthesis of a person's identity-bearing voice.
The 'When to use this skill' section uses ambiguous, context-based criteria instead of narrow triggers, making accidental invocation likely. In this skill, accidental invocation is more dangerous because it may process biometric audio and initiate installation or backend startup without a clearly expressed user request.
The usage flow tells the operator to select and reuse user audio files for cloning, but it provides no safeguards around consent, minimization, retention, or purpose limitation. This makes it easy to repurpose previously submitted audio for impersonation or other unintended uses without the user's informed agreement.
The installer provisions a TTS backend that the script itself admits does not support zero-shot voice cloning, while the skill is advertised as cloning a user's voice from reference audio. In a security-sensitive voice context, this mismatch can mislead operators and users into believing biometric voice-cloning functionality exists, undermining consent, trust, and policy controls around impersonation-capable features.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CDIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$CDIR"
# 0. Load optional runtime config from .env
CONFIG_FILE="${TTS_CONFIG_FILE:-$CDIR/.env}"
if [ -f "$CONFIG_FILE" ]; then
set -a
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CDIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$CDIR"
# 0. Load optional runtime config from .env
CONFIG_FILE="${TTS_CONFIG_FILE:-$CDIR/.env}"
if [ -f "$CONFIG_FILE" ]; then
set -a
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CDIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$CDIR"
# 0. Load optional runtime config from .env
CONFIG_FILE="${TTS_CONFIG_FILE:-$CDIR/.env}"
if [ -f "$CONFIG_FILE" ]; then
set -a
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CDIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$CDIR"
# 0. Load optional runtime config from .env
CONFIG_FILE="${TTS_CONFIG_FILE:-$CDIR/.env}"
if [ -f "$CONFIG_FILE" ]; then
set -a
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
CDIR="$(cd "$(dirname "$0")/.." && pwd)"
cd "$CDIR"
# 0. Load optional runtime config from .env
CONFIG_FILE="${TTS_CONFIG_FILE:-$CDIR/.env}"
if [ -f "$CONFIG_FILE" ]; then
set -a
The script sources a configuration file from TTS_CONFIG_FILE or .env using shell source, which executes arbitrary shell code in that file rather than merely parsing key/value settings. Because environment variables can redirect CONFIG_FILE to any path, anyone who can influence that file or variable can achieve code execution when the uninstall script is run.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
pkill -f "python app.py" 2>/dev/null && echo " ✓ 已清理残留 app.py 进程" || true
# 清理守护日志
rm -f server/daemon_server.log
# 清理生成的临时音频
rm -rf server/generated_audio
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
# 清理守护日志
rm -f server/daemon_server.log
# 清理生成的临时音频
rm -rf server/generated_audio
# -----------------------------------------------
# 2. 按模式清理引擎源码
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
在 server/app.py 直接运行时,自动回填项目根目录 .env 中的配置。
"""
repo_root = Path(__file__).resolve().parent.parent
env_path = Path(os.getenv("TTS_CONFIG_FILE", str(repo_root / ".env")))
if not env_path.exists():
return
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
在 server/app.py 直接运行时,自动回填项目根目录 .env 中的配置。
"""
repo_root = Path(__file__).resolve().parent.parent
env_path = Path(os.getenv("TTS_CONFIG_FILE", str(repo_root / ".env")))
if not env_path.exists():
return
The ChatTTS backend ignores ref_audio entirely despite the skill promising voice cloning from a user reference sample. In this context, that is a security-relevant integrity issue because users may believe the system is operating on their supplied biometric sample in a specific way when it is not, undermining consent, auditability, and expected behavior for a sensitive voice-cloning feature.
The OpenVoice backend claims to do base TTS generation followed by tone-color conversion, but the code never generates the intermediate source speech before conversion. As written, it attempts conversion on an empty temp path, creating unsafe and misleading behavior in a biometric voice-cloning context where incorrect implementation can produce unpredictable outputs and bypass expected safeguards or provenance controls.
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
The skill exposes capabilities to read files, access environment variables, invoke shell commands, and use the network, yet it declares no explicit tool scope or permission boundaries. In a skill that auto-installs software and handles user-provided paths, this increases the chance of unintended command execution, host modification, or data access beyond the stated purpose.
No suspicious patterns detected.