subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
candidates.append([sys.executable, "-m", "pip", "install", "--user", "faster-whisper"]) for cmd in candidates: print(f"[install] {' '.join(cmd)}", flush=True) if subprocess.run(cmd).returncode == 0: return True print(f"[install] failed, trying next installer...") return False- Confidence
- 88% confidence
- Finding
- The preflight path can automatically install packages by invoking external package managers ('uv' or 'pip') and then later load the installed code into the current interpreter. In a hostile or misconfigured environment, this expands trust to PATH-resolved executables, package indexes, mirrors, and dependency supply chain components, so running preflight with --install can execute untrusted code or install a tampered package.
