T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Incorrect and Unpinned Whisper Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-3
Vulnerability Type: Dependency-name mismatch and unpinned third-party packages
Risk Level: HighEvidence
text requests whisper edge-ttsTechnical Analysis
The project documentation declares
openai-whisperas the required speech-recognition package, butrequirements.txtinstalls the differently namedwhisperpackage. Although OpenAI Whisper is imported in Python usingimport whisper, its distribution name isopenai-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
- A user follows the documented installation command:
pip install -r requirements.txt. - The package index resolves
whisperrather than the documentedopenai-whisperdistribution. - Because no versions or hashes are specified, the installer accepts whichever matching releases the package index currently selects.
- An unintended or compromised package can execute code during installation or when imported by
bot.py. - 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]
- A user follows the documented installation command:
- Remediation
View remediation
Remediation Suggestions
- Replace
whisperwith the correct, reviewedopenai-whisperdistribution. - Pin every direct dependency to an explicitly reviewed version, for example:
text requests==<reviewed-version> openai-whisper==<reviewed-version> edge-tts==<reviewed-version> - Generate a lock file containing pinned transitive dependencies.
- Require package hashes during deployment, such as through a hash-locked requirements file and
pip install --require-hashes. - Install only from an approved package index and disable unintended fallback indexes.
- Run dependency vulnerability and provenance checks in CI before releasing or deploying the Skill.
- Install and execute the bot under a dedicated, unprivileged service account with access only to required files and environment variables.
- Replace
