T09 · Insecure Skill Coding Practices
- Location
podcastify.py:29- Finding
Insecure Temporary-File Creation Enables Local File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not clearly malicious, but it overstates its podcast/TTS behavior and ships unsafe temporary-file handling around ffmpeg.
Install only if you are comfortable treating this as unfinished sample code. Run it in a limited workspace, avoid privileged accounts, and review or fix the temporary-file handling before processing valuable files.
podcastify.py:29Insecure Temporary-File Creation Enables Local File Overwrite
The skill description promises trusted media-processing behavior, but the implementation behavior reportedly does not actually perform TTS and instead generates silent placeholder audio while only handling local file/stdin input. This mismatch can mislead users and reviewers about what the skill really does, making it easier to hide unsafe behavior or cause operators to grant permissions based on false expectations.
The skill declares executable capabilities that imply file read, file write, and shell access, but does not declare any explicit tool scope or permission boundaries. This creates unnecessary ambiguity about what the skill may access or execute at runtime, increasing the risk of overbroad filesystem or command execution if the skill is installed in a permissive environment.
The inline documentation says this function should be wired to a TTS provider and refers to a placeholder using a system 'say' command, implying speech generation from the provided text. In reality, the code ignores the text argument and invokes ffmpeg to create a 1-second silent WAV file, which contradicts the stated behavior of synthesizing podcast audio from text.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Placeholder: write to a dummy wav using say command (mac) or skip
path = tempfile.mktemp(suffix=f"_{idx}.wav")
# Replace this with real TTS call; here we just make a silent file
subprocess.run(["ffmpeg", "-f", "lavfi", "-i", "anullsrc=r=44100:cl=mono", "-t", "1", "-q:a", "9", "-acodec", "pcm_s16le", path], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
return path
def main():
The ffmpeg concat invocation is fed by a list file built from temporary paths and uses '-safe 0', which disables ffmpeg's path-safety checks. Because the code also creates filenames with tempfile.mktemp, an attacker on the same system could exploit the race window or path manipulation to influence what files ffmpeg reads during concatenation, making this more dangerous in multi-user or shared execution environments.
with open(concat_list, 'w') as f:
for w in wavs:
f.write(f"file '{w}'\n")
subprocess.run(["ffmpeg", "-f", "concat", "-safe", "0", "-i", concat_list, "-c", "copy", args.out], check=True)
print(f"Output: {args.out}")
finally:
for w in wavs:
No suspicious patterns detected.