T08 · Insecure Dependencies
- Location
transcribe.py:67- Finding
Automatic Installation of an Unpinned Dependency from a Third-Party Package Index
- Content
View full analysis
Vulnerability Details
File Location:
transcribe.py, lines 67-72
Vulnerability Type: Supply-chain risk through automatic installation of mutable dependencies from a third-party package index
Risk Level: MediumVulnerable Code
python subprocess.check_call([ sys.executable, "-m", "pip", "install", "openai-whisper", "-i", "https://pypi.tuna.tsinghua.edu.cn/simple", "--break-system-packages", "--user" ])Technical Analysis
When Whisper is unavailable, the Skill automatically invokes pip and installs
openai-whisperfrom a third-party package index. The dependency has no pinned version, and neither it nor its transitive dependencies are verified with cryptographic hashes.Consequently, the code executed during installation is not fixed to the version reviewed during this audit. A compromised package-index mirror, malicious upstream release, or compromised transitive dependency could introduce arbitrary package installation code. Python packages can execute code during build or installation, making this an execution-capable supply-chain boundary rather than a simple data download.
The
--break-system-packagesoption bypasses protections intended to prevent pip from modifying externally managed Python environments. Although--usergenerally limits installation to the invoking user's package directory, using both options may still cause dependency conflicts, shadow trusted modules, or alter the behavior of other Python applications run by that user.The automatic installation behavior is disclosed in
SKILL.md, but disclosure does not address the lack of version pinning, integrity verification, isolation, or approval immediately before installation.Attack Path
- A user invokes
transcribe.pyon a system where the Whisper CLI is not detected. main()callsinstall_whisper().- The Skill launches pip against
https://pypi.tuna.tsinghua.edu.cn/simple. - pip dynamically resolves the latest availa ...[truncated 1126 chars]
- A user invokes
- Remediation
View remediation
Remediation Suggestions
- Remove automatic dependency installation from the runtime transcription path. Detect missing dependencies and require an explicit installation step or clear user confirmation.
- Pin
openai-whisperand every transitive dependency to reviewed versions in a lock file. - Require cryptographic hashes, such as with
pip install --require-hashes -r requirements.txt, so altered artifacts are rejected. - Prefer a trusted official package index or an organization-controlled repository that synchronizes and verifies approved artifacts.
- Install dependencies in a dedicated virtual environment rather than the user's shared Python environment.
- Remove
--break-system-packagesto preserve externally managed environment protections. - Use binary wheels from trusted sources where practical and prevent unexpected source builds.
- Document expected package versions, artifact hashes, download sources, and the fact that dependency and model acquisition requires network access.
- Re-audit and update the lock file through a controlled dependency-update process rather than resolving the newest available versions during normal execution.
