T08 · Insecure Dependencies
Warning
- Location
- scripts/transcribe.sh:82
- Finding
- Automatic Installation of Unlocked and Incompletely Verified Dependencies## Vulnerability Details **File Location**: `scripts/transcribe.sh:82-85`, `scripts/requirements.txt:1-11` **Vulnerability Type**: Insecure dependency installation and incomplete integrity pinning **Risk Level**: Medium The wrapper automatically upgrades pip and installs project dependencies whenever the virtual environment is new or the requirements file has changed. ```bash # scripts/transcribe.sh:82-85 if [[ ! -f "$VENV_DIR/.installed" ]] || [[ "$REQUIREMENTS" -nt "$VENV_DIR/.installed" ]]; then log "Installing dependencies..." pip install -q --upgrade pip pip install -q -r "$REQUIREMENTS" touch "$VENV_DIR/.installed" fi ``` The corresponding dependency specification is only partially locked: ```text # scripts/requirements.txt:1-11 # Pure Python packages - pinned with hashes for supply chain security elevenlabs==2.34.0 \ --hash=sha256:3a46b40e69ac2841b2183a00d651a68bd11733d95d32a5ed8163d3aa6a0b13be pydub==0.25.1 \ --hash=sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6 python-dotenv==1.0.1 \ --hash=sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a # Platform-specific packages - pinned versions only (hashes vary by platform) sounddevice==0.5.1 numpy>=1.24.0 ``` ### Technical Analysis `pip install --upgrade pip` retrieves and installs the currently available pip release without an exact version or artifact hash. This makes the effective installation payload mutable after the Skill has been reviewed. The application requirements are also not fully reproducible. `numpy>=1.24.0` permits future releases, while `sounddevice` and `numpy` have no hashes. Transitive dependencies are not explicitly locked in the reviewed file either. This contradicts the stated supply-chain-security objective. Because hashes are present for some requirements, pip may activate hash-checking behavior and reject the unhashed or non-exact requ ...[truncated 1960 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the automatic `pip install --upgrade pip` operation from normal Skill execution. Treat environment provisioning as an explicit, user-approved setup action. 2. If a specific pip version is required, pin it exactly and verify the downloaded artifact against trusted hashes. 3. Lock every direct and transitive dependency to an exact version using a reproducible lock-generation process. 4. Include SHA-256 hashes for every permitted wheel or source distribution and install with `pip install --require-hashes`. 5. Replace `numpy>=1.24.0` with a reviewed exact version. 6. Add hashes for all supported `sounddevice` and `numpy` platform artifacts. 7. Use a trusted, explicitly configured package index and retain TLS certificate verification. 8. Build and verify the virtual environment during packaging or controlled deployment where practical, rather than modifying the runtime environment on first invocation. 9. Run dependency installation and the Skill under a low-privilege account or sandbox with restricted filesystem, environment-variable, microphone, and network access. 10. Add automated checks that reject unlocked dependencies, missing hashes, and dependency files that cannot install successfully in hash-enforcement mode.
