T08 · Insecure Dependencies
Warning
- Location
- README.md:66
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `README.md:66-67`, `README.md:103-120`, `SKILL.md:310-312` **Vulnerability Type**: Unpinned and unverifiable third-party dependencies **Risk Level**: Medium ### Vulnerable Code `README.md:66-67`: ```bash pip install openai-whisper opencc-python-reimplemented torch brew install ffmpeg # macOS ``` `README.md:103-120` includes platform-specific installation commands such as: ```bash pip3 install openai-whisper opencc-python-reimplemented torch torchvision ``` ```bash pip3 install openai-whisper opencc-python-reimplemented torch torchvision --index-url https://download.pytorch.org/whl/cpu ``` `SKILL.md:310-312`: ```bash pip install openai-whisper opencc-python-reimplemented torch brew install ffmpeg # macOS ``` ### Technical Analysis The documented installation commands retrieve mutable package versions without exact version pins, cryptographic hashes, or a reviewed lockfile. Consequently, the code installed by users can differ from the dependencies that existed when the Skill was audited. Specifying the PyTorch package index changes the repository used for resolution but does not authenticate individual expected artifacts or constrain them to reviewed versions. The executable script subsequently imports `torch`, `whisper`, and `opencc`, so code contained in those installed packages runs in the user's Python process. This issue requires compromise or malicious replacement of an upstream package, release, dependency, or configured package repository. The audit did not find evidence that the currently named packages are malicious. ### Attack Path 1. An attacker compromises a dependency publisher account, package repository, or transitive dependency and publishes a malicious or backdoored release. 2. A user follows the Skill documentation and runs an unpinned `pip` installation command. 3. The package resolver selects the attacker-controlled release because no exact version or artifact hash is requ ...[truncated 1098 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Create a reviewed dependency lockfile containing exact direct and transitive versions. 2. Generate and record SHA-256 hashes for every permitted distribution artifact. 3. Install dependencies with hash verification, for example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Pin dependencies exactly rather than using minimum or unconstrained versions: ```text openai-whisper==<reviewed-version> --hash=sha256:<reviewed-hash> opencc-python-reimplemented==<reviewed-version> --hash=sha256:<reviewed-hash> torch==<reviewed-version> --hash=sha256:<reviewed-hash> ``` 5. Use a dedicated virtual environment with no elevated privileges. 6. Review and lock transitive dependencies, not only the top-level packages. 7. Perform dependency vulnerability and provenance checks in CI. 8. Document trusted package indexes explicitly and avoid user-configured fallback indexes. 9. Verify runtime-downloaded Whisper model artifacts against documented checksums or distribute a signed model manifest. 10. Periodically update dependency pins through a controlled review and testing process. ]]>
