T09 · Insecure Skill Coding Practices
- Location
scripts/generate_audio.py:4- Finding
Unnecessary Exposure of Environment Secrets to a Network-Capable TTS Subprocess
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This video-production skill is mostly coherent, but it needs review because its audio helper unnecessarily loads local .env secrets and passes them to a network-capable text-to-speech subprocess.
Install only in a project workspace where generated files can be overwritten safely. Avoid running the audio helper in directories with sensitive .env files, or remove dotenv loading and run TTS with a minimal environment. Treat narration text, slide content, target URLs, and template background image fetches as data that may be sent to external services.
scripts/generate_audio.py:4Unnecessary Exposure of Environment Secrets to a Network-Capable TTS Subprocess
The skill describes shell and environment-dependent execution (webreel, ffmpeg, TTS tooling, cloud VM/headless operation) but does not declare any tool scope or allowed-tools boundary. This increases the chance an agent will invoke broad shell capabilities without explicit restriction, which can lead to unintended command execution, file modification, or access beyond what the user expected.
The skill advertises narration via DashScope/Edge-TTS but does not warn that script content, slide text, or other user-provided material may be sent to third-party services for synthesis. In a video-production context, this can expose confidential product details, unreleased features, or proprietary academic content to external providers without informed consent.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"ffprobe", "-v", "error", "-show_entries", "format=duration",
"-of", "default=noprint_wrappers=1:nokey=1", audio_path
]
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
return float(result.stdout.strip())
def assemble_mp4(frame_dir, audio_path, output_path, fps):
The code defaults to the zh-CN-XiaoxiaoNeural voice in both the function signature and CLI argument, which imposes a specific language/locale choice on users unless they override it. This is a natural-language policy concern because the skill does not document a user choice prompt or a justification for restricting output to Chinese.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"--write-media", output_file,
"--voice", voice
]
subprocess.run(cmd, check=True)
print(f"✓ Audio saved to {output_file}")
def main():
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"--write-media", output_file,
"--voice", voice
]
subprocess.run(cmd, check=True)
print(f"✓ Audio saved to {output_file}")
def main():
The workflow automatically generates artifacts such as storyboard.md, webreel.config.json, slides.md, narration outputs, and final media, but does not explicitly warn that existing files may be created or overwritten. In practice this can cause accidental loss of local work products or confusion about which generated artifacts are safe to keep, publish, or replace.