subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if skip_update: return yt_dlp update = subprocess.run([*yt_dlp, "-U"], text=True) if update.returncode != 0: print("yt-dlp self-update failed or is disabled; upgrading with pip instead.", flush=True) pip_install_or_upgrade()- Confidence
- 90% confidence
- Finding
- This executes yt-dlp with its self-update flag, which causes code fetched from outside the local trust boundary to modify the installed executable at runtime. In an agent skill context, silently updating and then executing a tool increases supply-chain risk and makes behavior non-reproducible, especially if the discovered yt-dlp binary is not tightly controlled.
