T09 · Insecure Skill Coding Practices
- Location
scripts/download.py:66- Finding
SSRF Protection Is Vulnerable to DNS Rebinding and Unvalidated Redirects
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its downloader has under-disclosed network and temporary-file safety weaknesses that merit review before installation.
Install only if you are comfortable with a local downloader making network requests from your machine and sending generated files back through the message tool. Prefer installing yt-dlp in an isolated pinned environment, run the downloader in a network-restricted sandbox if possible, and avoid use on sensitive hosts until the temporary-file handling and SSRF controls are tightened.
scripts/download.py:66SSRF Protection Is Vulnerable to DNS Rebinding and Unvalidated Redirects
scripts/download.py:88Predictable Shared Temporary Filename Permits File Substitution
SETUP.md:6Unpinned Dependency Is Installed into the System Python Environment
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Debian/Ubuntu/Kali
sudo apt install ffmpeg
pip install --break-system-packages yt-dlp
# macOS
The skill instructs the agent to invoke a local Python script and perform network-backed media downloads, but the manifest declares no explicit tool scope or allowed-tools restrictions. This creates an authorization gap where the runtime may permit broader shell or network actions than intended, making misuse, overreach, or unsafe execution paths harder to constrain and audit.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"--", url
]
result = subprocess.run(cmd, capture_output=True, text=True, timeout=120)
if result.returncode != 0:
return None, f"Download failed: {result.stderr.strip()}"
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# Check metadata first
print(f"Checking metadata for: {url}")
meta_cmd = ["yt-dlp", "--no-playlist", "--print", "title", "--no-warnings", "--", url]
meta_result = subprocess.run(meta_cmd, capture_output=True, text=True, timeout=30)
if meta_result.returncode != 0 or not meta_result.stdout.strip():
print(f"ERROR: Could not fetch video metadata. URL may be invalid or blocked.")
No suspicious patterns detected.