T03 · Remote Payload Retrieval and Execution
- Location
scripts/setup.py:372- Finding
Unverified Remote Executable Download and Installation
- Content
View full analysis
bool: """ Install yt-dlp standalone binary. Installation location: ~/.openclaw/tools/yt-dlp/yt-dlp """ import platform import urllib.request existing = find_ytdlp() if existing: print(f" ℹ️ yt-dlp already installed at {existing}") return True tools_dir = os.path.expanduser("~/.openclaw/tools/yt-dlp") os.makedirs(tools_dir, exist_ok=True) system = platform.system().lower() machine = platform.machine().lower() base_url = "https://github.com/yt-dlp/yt-dlp/releases/latest/download" if system == "darwin": binary_name = "yt-dlp_macos" elif system == "linux": if machine == "aarch64": binary_name = "yt-dlp_linux_aarch64" else: binary_name = "yt-dlp_linux" else: print(f" ❌ Unsupported platform: {system}/{machine}") print(f" Try: pip install yt-dlp") return False url = f"{base_url}/{binary_name}" download_path = os.path.join(tools_dir, "yt-dlp") try: print(f" → Downloading yt-dlp...") urllib.request.urlretrieve(url, download_path) os.chmod(download_path, 0o755) print(f" ✅ yt-dlp installed to {download_path}") return True ``` A similar issue exists in `scripts/setup.py:253-339`, where a Pandoc release archive is downloaded and its extracted binary is made executable without validating a trusted checksum or signature. ### Technical Analysis The setup process retrieves a native executable through the mutable GitHub `latest/download` endpoint, writes it into a persistent tools directory, and immediately grants executable permissions. It does not verify a cryptographic digest, release signature, provenance attestat ...[truncated 1800 chars]- Remediation
View remediation
