T08 · Insecure Dependencies
- Location
scripts/generate_srt.py:1- Finding
Unpinned Runtime Dependency Creates a Supply-Chain Risk
- Content
View full analysis
=3.10" # dependencies = [ # "faster-whisper>=1.0.0", # ] # /// ``` ### Technical Analysis The script is executed through `uv run` and declares `faster-whisper>=1.0.0` as an inline dependency. This open-ended constraint permits any current or future version satisfying the minimum version requirement. No exact version, lockfile, package hash, or other integrity control is present in the audited project. Consequently, the dependency content used by the script can change after the Skill has been reviewed. If the package distribution or an upstream dependency is compromised, a later invocation could install and import attacker-controlled code. This finding concerns unsafe dependency resolution. The audit found no evidence that the currently named package is intentionally malicious. ### Attack Path 1. An attacker compromises a future release of `faster-whisper`, its package-distribution account, its repository pipeline, or a transitively resolved dependency. 2. The malicious release remains compatible with the declared `>=1.0.0` constraint. 3. A user invokes `scripts/generate_srt.py` through its `uv run` shebang in an environment that does not already have a securely locked dependency set. 4. `uv` resolves and installs the compromised compatible release. 5. The script imports the package using: ```python from faster_whisper import WhisperModel ``` 6. Malicious package initialization or runtime code executes with the permissions of the user running the Skill. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the invoking user's account. The resulting access would be limited by that user's operating-system per ...[truncated 567 chars]- Remediation
View remediation
", # ] ``` 2. Maintain a lockfile containing exact versions for the complete transitive dependency graph. 3. Use package hashes or another integrity-verification mechanism where supported. 4. Resolve and install dependencies during a controlled setup or build phase rather than silently selecting new releases whenever the script is launched. 5. Periodically update the pinned dependency through a review process that includes vulnerability scanning and release provenance verification. 6. Use a trusted package index and prevent unintended fallback to untrusted or user-controlled indexes. 7. Run transcription in a sandbox with restricted filesystem and network access to reduce the impact of a future supply-chain compromise. ]]>
