T08 · Insecure Dependencies
Error
- Location
- requirements.txt:1
- Finding
- Incorrect and Unpinned Whisper Dependency Creates a Supply-Chain Risk## Vulnerability Details **File Location**: `requirements.txt:1-3` **Vulnerability Type**: Dependency-name mismatch and unpinned third-party packages **Risk Level**: High ### Evidence ```text requests whisper edge-tts ``` ### Technical Analysis The project documentation declares `openai-whisper` as the required speech-recognition package, but `requirements.txt` installs the differently named `whisper` package. Although OpenAI Whisper is imported in Python using `import whisper`, its distribution name is `openai-whisper`. This mismatch can cause installation of an unintended package from the configured package index. In addition, none of the three dependencies is pinned to a reviewed version or protected by package hashes. A future compromised or malicious release could therefore be selected automatically during installation. Python package installation and subsequent imports can execute package-controlled code. Such code would run with the privileges of the user or service account installing or launching the bot. ### Attack Path 1. A user follows the documented installation command: `pip install -r requirements.txt`. 2. The package index resolves `whisper` rather than the documented `openai-whisper` distribution. 3. Because no versions or hashes are specified, the installer accepts whichever matching releases the package index currently selects. 4. An unintended or compromised package can execute code during installation or when imported by `bot.py`. 5. That code runs under the installing or bot service account and can access resources available to that account, including the bot environment and `TELEGRAM_BOT_TOKEN`. Exploitation requires an unintended or compromised dependency to be served by the configured package index; the audited repository itself does not contain such a payload. ### Impact Assessment Successful supply-chain exploitation could provide arbitrary code execution with the privileges of the ...[truncated 567 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `whisper` with the correct, reviewed `openai-whisper` distribution. 2. Pin every direct dependency to an explicitly reviewed version, for example: ```text requests==<reviewed-version> openai-whisper==<reviewed-version> edge-tts==<reviewed-version> ``` 3. Generate a lock file containing pinned transitive dependencies. 4. Require package hashes during deployment, such as through a hash-locked requirements file and `pip install --require-hashes`. 5. Install only from an approved package index and disable unintended fallback indexes. 6. Run dependency vulnerability and provenance checks in CI before releasing or deploying the Skill. 7. Install and execute the bot under a dedicated, unprivileged service account with access only to required files and environment variables.
