T09 · Insecure Skill Coding Practices
- Location
scripts/transcribe.py:24- Finding
Predictable temporary audio path causes unintended file upload and deletion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This video transcription skill has a coherent purpose, but its bundled script can accidentally upload and delete an existing same-name WAV file and overwrite same-name text files without confirmation.
Install only if you are comfortable sending audio to OpenAI or Azure OpenAI when embedded subtitles are absent. Before use, make sure there is no important same-name .wav or .txt file beside the selected video, because this version may upload/delete the WAV and overwrite the TXT without asking. Store ~/.transcribe_video.env with restricted permissions and prefer pinned dependencies in a virtual environment.
scripts/transcribe.py:24Predictable temporary audio path causes unintended file upload and deletion
scripts/transcribe.py:25Existing transcript files are overwritten without confirmation
SKILL.md:68Documentation instructs installation of unpinned runtime dependencies
The skill invokes shell commands, reads environment-backed credentials, and writes output files, but it does not declare any explicit tool scope or permissions boundaries. That increases the chance of overbroad execution in hosts that rely on manifest-level permission gating, making shell/file/env access less auditable and easier to misuse if the skill is triggered unexpectedly.
The trigger conditions are broad enough to activate on common phrases like "transcribe" or generic requests for a script/transcript from a video file. Overbroad invocation can cause the agent to enter a workflow that runs shell commands and may upload audio to an external API without the user specifically intending this skill, increasing risk from unintended execution and data handling.
The skill directs extracted audio to an external transcription API but does not require an explicit user-facing notice or consent step before transmission. Because video audio may contain sensitive or regulated content, silent off-device transfer creates a real privacy and compliance risk, especially when the user may expect purely local processing.
The skill instructs use of a persistent credentials file in the home directory, which creates session persistence for sensitive API configuration beyond the immediate task. While common operationally, persistent secret storage can broaden exposure if the environment is shared, backed up insecurely, or later accessed by other tools without clear scoping.
test -f ~/.transcribe_video.env && echo "OK" || echo "MISSING"
2. If MISSING, tell the user to create `~/.transcribe_video.env` with:
OPENAI_API_KEY=your-key-here
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Extract audio
if not audio_path.exists():
print(f"Extracting audio from {video_path}...")
subprocess.run(
["ffmpeg", "-i", str(video_path), "-vn", "-acodec", "pcm_s16le",
"-ar", "16000", "-ac", "1", str(audio_path), "-y"],
check=True, capture_output=True,
Although the skill is described as handling local video files, it transmits extracted audio to OpenAI or Azure OpenAI for transcription. This creates a material data exfiltration/privacy risk because users may reasonably expect local-only processing while potentially sensitive spoken content leaves the host and is sent to a third-party service.
The code uploads audio content to a remote transcription API without any explicit user-facing warning at the point of use. In a transcription workflow, audio often contains sensitive personal, business, or regulated information, so silent transmission increases the risk of privacy violations and noncompliant handling of user data.
The script loads credentials from ~/.transcribe_video.env before processing the video. Accessing a hidden file in the user's home directory to retrieve secrets is an additional capability not described in the manifest, which only describes extracting transcripts from local video files.
No suspicious patterns detected.