T08 · Insecure Dependencies
Warning
- Location
- README.md:32
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:32-36` - `README-CN.md:23-25` - `README-CN.md:120-122` - `transcribe.py:1-6` **Vulnerability Type**: Unpinned dependency and software supply-chain exposure **Risk Level**: Medium ### Vulnerable Code `README.md:32-36`: ```bash # Install dependencies pip3 install openai-whisper brew install ffmpeg # macOS # or: sudo apt install ffmpeg # Ubuntu ``` `README-CN.md:23-25`: ```bash # 安装Whisper pip3 install openai-whisper ``` `README-CN.md:120-122`: ```bash pip3 install openai-whisper ``` `transcribe.py:1-6`: ```python #!/usr/bin/env python3 """ Whisper 语音转文字工具 依赖: openai-whisper, ffmpeg 安装: pip3 install openai-whisper && brew install ffmpeg """ ``` ### Technical Analysis The installation instructions retrieve `openai-whisper` without specifying a reviewed version or validating package integrity with cryptographic hashes. Consequently, the code installed by users can change after this Skill has been audited. Although there is no evidence that the current `openai-whisper` package is malicious, an upstream account compromise, malicious future release, dependency compromise, or unexpected breaking change could cause users to install code different from the version originally reviewed. Python package installation may execute package build hooks and installs executable Python code that will later be imported by `transcribe.py`. This exposure is not necessary for the Skill's functionality in its current form. Whisper is a legitimate functional dependency, but reproducible version and integrity controls can be applied without reducing transcription capabilities. ### Attack Path 1. An attacker compromises the upstream package publication account, package repository, release process, or one of the package's transitive dependencies. 2. The attacker publishes a malicious or modified release that remains compatible with the unpinned package name. 3. A user follows the documented `pip3 install opena ...[truncated 1288 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `openai-whisper` and all relevant transitive dependencies to reviewed versions in a dependency file, for example: ```text openai-whisper==<reviewed-version> ``` 2. Generate and verify cryptographic hashes using a reproducible dependency-management process. Install with hash enforcement where practical: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Maintain a lock file produced by a tool such as `pip-tools`, and review dependency updates before changing locked versions. 4. Install dependencies in a dedicated virtual environment rather than the system Python environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Update all installation examples in `README.md`, `README-CN.md`, and `transcribe.py` so they reference the same pinned dependency file. 6. Document the expected official package index and discourage installation from untrusted mirrors or alternate package sources. 7. Consider verifying downloaded Whisper model artifacts through the integrity mechanisms supported by the upstream library, because `whisper.load_model()` downloads model data on first use. ]]>
