T08 · Insecure Dependencies
- Location
scripts/setup.sh:12- Finding
Unpinned Python dependency installation permits supply-chain substitution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/setup.sh, lines 12-15
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
bash # Install requests library (the only dependency) echo "📦 Installing Python dependencies..." pip3 install requests --quiet echo " ✅ requests installed"Technical Analysis
The setup script installs
requestsdirectly from the Python package index without an exact version, integrity hash, lockfile, isolated virtual environment, or explicit trusted index. Consequently, installation results can change over time without any modification to the reviewed Skill.Although
requestsis a legitimate and widely used dependency, the command resolves its latest compatible release and its transitive dependencies at installation time. If the package publisher, package index, configured mirror, DNS/proxy infrastructure, or a transitive dependency is compromised, a malicious distribution could be selected.Python package installation can execute build-backend code while processing source distributions. A malicious package can therefore execute code during
pip3 install, before the Skill imports or invokes the dependency. The absence of a virtual environment also allows the command to modify the invoking user's global or user-level Python environment.The same supply-chain concern applies to the documentation's unpinned
pip install edge-ttsinstruction, but the directly executable installation sink is the command shown above.Attack Path
- An attacker compromises the
requestspublishing account, a transitive dependency, the configured Python index or mirror, or another component in the package-resolution path. - The attacker publishes or serves a malicious package version or source distribution.
- A user executes
scripts/setup.sh. pip3 install requests --quietresolves the attacker-controlled artifact because ...[truncated 1296 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin every direct and transitive Python dependency to an reviewed version in a dedicated requirements or lock file.
-
Record cryptographic hashes and enforce them during installation:
text requests==2.32.5 \ --hash=sha256:<verified-wheel-hash>bash python3 -m pip install \ --require-hashes \ --only-binary=:all: \ -r requirements.txt -
Generate and review a fully resolved lock file with tooling such as
pip-compile, including hashes for all transitive dependencies. -
Install dependencies into a Skill-specific virtual environment rather than the global Python environment:
bash python3 -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements.txt -
Use
python3 -m pipinstead of a standalonepip3command to ensure dependencies are installed for the intended interpreter. -
Explicitly configure the approved package index and prevent fallback to untrusted extra indexes.
-
Remove
--quietduring security-sensitive installation or emit the resolved versions and artifact sources so users can audit what was installed. -
Pin
edge-ttsand its transitive dependencies in the same lock file rather than directing users to run an unpinned installation command. -
Add automated dependency scanning and a controlled update process in which version and hash changes are reviewed before release.
-
