T08 · Insecure Dependencies
- Location
scripts/run_local_subtitles.sh:18- Finding
Automatic Installation of Non-Reproducible Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
scripts/run_local_subtitles.sh:18-20;scripts/requirements.txt:1
Vulnerability Type: Supply-chain exposure through unpinned dependencies
Risk Level: MediumVulnerable Code:
bash if ! "$VENV_DIR/bin/python3" -c "import faster_whisper" >/dev/null 2>&1; then "$VENV_DIR/bin/python3" -m pip install -U pip >/dev/null "$VENV_DIR/bin/python3" -m pip install -r "$SCRIPT_DIR/requirements.txt" >/dev/null fitext faster-whisper>=1.1.0,<2Technical Analysis
The normal execution path automatically upgrades pip and installs
faster-whisperfrom the package source configured for pip when the dependency is not already available. The requirement permits any release from version 1.1.0 up to, but excluding, version 2. Neither the direct dependency nor its transitive dependencies are locked to exact reviewed versions or verified using cryptographic hashes.As a result, installations performed at different times can retrieve and execute different package code. The effective dependency source can also be influenced by pip configuration and environment settings outside this project. A compromised package release, compromised package index, or attacker-controlled index configured on the host could therefore introduce arbitrary code during installation or subsequent import.
Attack Path
- An attacker compromises a permitted future dependency release or causes the victim's pip configuration to use an attacker-controlled package source.
- The user invokes
scripts/run_local_subtitles.shin an environment wherefaster_whisperis not importable from the virtual environment. - The wrapper upgrades pip and resolves the broad dependency specification from the configured source.
- pip downloads and installs the unreviewed package and its transitive dependencies.
- Malicious package installation hooks or imported runtime code execu ...[truncated 629 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin all direct and transitive dependencies to exact, reviewed versions using a generated lock file.
- Record cryptographic hashes for every distribution and install with pip's
--require-hashesoption. - Avoid upgrading pip automatically during ordinary skill execution. Pin and provision a reviewed pip version separately.
- Configure an explicit trusted package index rather than relying on ambient pip configuration.
- Prefer an internally mirrored or otherwise controlled dependency repository for production use.
- Request explicit user approval before performing network-dependent package installation.
- Regularly regenerate the lock file through a controlled review and vulnerability-scanning process.
