T08 · Insecure Dependencies
- Location
download_video.py:66- Finding
Unpinned Runtime Installation of yt-dlp
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This video downloader is generally aligned with its purpose, but it needs review because a normal download can automatically install or fetch executable tools without integrity checks or clear per-use consent.
Review before installing. Use this only in an environment where automatic package installation and video downloads are acceptable. Prefer installing reviewed versions of yt-dlp and ffmpeg yourself, avoid browser-cookie options unless you understand they expose logged-in session credentials to yt-dlp, and restrict output paths to folders you intend the tool to write to.
download_video.py:66Unpinned Runtime Installation of yt-dlp
download_video.py:24Downloaded FFmpeg Binary Is Used Without Integrity Verification
The --cookies-from-browser examples instruct extraction of browser cookies from local browser profiles. Although this is a legitimate yt-dlp feature for authenticated downloads, browser cookies are sensitive credentials; normalizing their use in a skill increases the chance of credential misuse, over-collection, or leakage to commands, logs, or remote services.
loads`
.trae/skills/视频下载器/ffmpeg/)对于需要登录的视频,可以使用浏览器cookies:
yt-dlp "URL" --cookies-from-browser chrome
yt-dlp "URL" --cookies-from-browser edge
yt-dlp "URL" --cookies-from-browser firefox
403 Forbidden错误:YouTube等网站的反爬虫机制,可以尝试:
pip install --upgrade yt-dlp视频质量不理想:尝试使用不同的格式选择器或使用浏览器cookies
ffmpeg下载失败:如果自动下载ffmpeg失败,可以手动下载并解压到技能目录的ffmpeg/文件夹
The skill describes capabilities that require shell execution, network access, and likely environment access, but it declares no explicit tool scope or permissions. That makes the operational boundary unclear and increases the chance the agent invokes powerful actions without adequate review or sandboxing.
The trigger description is broad enough to overlap with common user intents like 'save' or 'download video,' which can cause unintended invocation. In a skill that performs network access, package installation, and file writes, accidental activation materially increases security and privacy risk.
The documentation says the skill will automatically download and install ffmpeg and yt-dlp, but it does not prominently warn users that this changes the local system and performs outbound network activity. Silent installation of executables and dependencies is risky because it expands trust to external sources and may bypass user expectations or enterprise controls.
The script silently downloads, extracts, moves, and deletes FFmpeg files on Windows without user disclosure or integrity verification. This creates supply-chain and unexpected file-modification risk: a content-download request can trigger installation of a large binary tool from the internet and write into the skill directory, which is especially sensitive in agent-managed environments.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def check_ytdlp():
"""Check if yt-dlp is installed, if not, install it"""
try:
subprocess.run(["yt-dlp", "--version"], capture_output=True, check=True)
print("yt-dlp is already installed")
except (subprocess.CalledProcessError, FileNotFoundError):
print("Installing yt-dlp...")
Automatic pip installation without warning or confirmation is unsafe because it silently changes the user's environment and downloads executable package content from the network. In an agent skill, this is more dangerous than a normal CLI utility because the user may think they only requested a file download, not a software installation or upgrade.
The script automatically installs or upgrades yt-dlp via pip without prior user approval. This causes execution of package installation logic and modifies the runtime environment, which is risky in an agent context because a simple download request can unexpectedly trigger code/package changes and pull unpinned code from external repositories.
print("yt-dlp is already installed")
except (subprocess.CalledProcessError, FileNotFoundError):
print("Installing yt-dlp...")
subprocess.run([sys.executable, "-m", "pip", "install", "--upgrade", "yt-dlp"], check=True)
print("yt-dlp installed successfully")
def download_video(url, quality="1080p", output_dir=None, audio_only=False):
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"Quality: {quality}")
print(f"Output directory: {output_dir}")
subprocess.run(cmd, check=True)
print("Download completed!")
def main():
整个技能名称、描述和使用说明均固定为中文,未声明这是面向特定中文用户群体的区域性技能,也未提供语言选择或用户 opt-in。按规则,这可能构成自然语言层面的语言/区域策略问题。
No suspicious patterns detected.