T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Dependency Installation Creates Supply-Chain Exposure
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1,setup.sh:21-32
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code
text requests>=2.28.0bash # Install dependencies into scripts/vendor/ (works with any system python3) VENDOR_DIR="$SKILL_DIR/scripts/vendor" echo "Installing dependencies into scripts/vendor/..." python3 -m pip install -q --target "$VENDOR_DIR" -r "$SKILL_DIR/requirements.txt" # Also install into venv as fallback if [ ! -d "$VENV_DIR" ]; then echo "Creating virtual environment..." python3 -m venv "$VENV_DIR" else echo "Virtual environment already exists." fi "$VENV_DIR/bin/pip" install -q -r "$SKILL_DIR/requirements.txt"Technical Analysis
The dependency specification permits any future version of
requestsequal to or newer than 2.28.0. Its transitive dependencies are also resolved dynamically. No lock file, exact version constraints, package hashes, or trusted package repository configuration is present.Consequently, the code installed by
setup.shis not the same fixed dependency set that was available during this audit. The setup process installs the mutable dependency tree twice: once intoscripts/vendor/and once into the virtual environment. Python package installation and later imports can execute package-controlled code.This is a supply-chain hardening weakness rather than evidence that the currently named
requestspackage is malicious.Attack Path
- An attacker compromises a permitted future package release, a transitive dependency, or the package delivery channel.
- The user or agent runs
bash setup.sh. - Pip resolves the newest package versions satisfying
requests>=2.28.0. - The compromised package is installed into
scripts/vendor/and.venv. - Package-controlled code executes during installation or when imported by the provide ...[truncated 565 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace range-based requirements with reviewed, exact versions for direct and transitive dependencies.
- Generate a reproducible lock file using a tool such as
pip-tools. - Record and enforce package hashes:
bash pip install --require-hashes -r requirements.lock - Configure pip to use an explicitly trusted package index.
- Add automated dependency vulnerability and integrity scanning.
- Avoid installing the same dependencies into two locations unless both are required.
- Review and deliberately update the lock file rather than resolving arbitrary future releases during setup.
