T08 · Insecure Dependencies
Warning
- Location
- Scripts/requirements.txt:3
- Finding
- Mutable and Unhashed Third-Party Dependencies## Vulnerability Details **File Location**: `Scripts/requirements.txt:3-8` **Vulnerability Type**: Supply-chain exposure through mutable dependency resolution **Risk Level**: Medium ### Vulnerable Code ```text yfinance>=0.2.28,<0.3.0 pandas>=2.0.0,<3.0.0 lxml>=5.0.0,<6.0.0 tqdm>=4.65.0,<5.0.0 requests>=2.31.0,<3.0.0 reportlab>=4.0.0,<5.0.0 ``` The installation of these dependencies is required by `SKILL.md:153-156` and documented in `README.md:30-33`: ```bash pip install --no-cache-dir -r Scripts/requirements.txt ``` ### Technical Analysis The dependency file permits any package release within broad version ranges and does not provide integrity hashes. Consequently, installation is not reproducible: the same command can resolve to different direct or transitive package versions over time. If an allowed future release, dependency account, package repository, or transitive dependency is compromised, pip may install attacker-controlled code without any project changes. `--no-cache-dir` does not provide integrity verification and may increase reliance on freshly retrieved repository content. This also conflicts with the README statement that dependency versions are pinned. The use of a virtual environment limits package installation to that environment, but it does not sandbox package installation or runtime code from the invoking user's files, environment variables, network access, or operating-system privileges. ### Attack Path 1. An attacker compromises a permitted package release or one of its unresolved transitive dependencies. 2. The malicious release remains within the version ranges specified in `Scripts/requirements.txt`. 3. A user or Agent follows the mandatory installation instructions. 4. pip resolves and downloads the compromised release because no exact lock or trusted hash constrains the artifact. 5. Malicious package installation or runtime code executes with the pri ...[truncated 1099 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version using `==`. 2. Resolve and lock all transitive dependencies rather than only the six direct packages. 3. Generate cryptographic hashes for every accepted distribution and install with: ```bash pip install --require-hashes -r Scripts/requirements.txt ``` 4. Generate the lock file through a controlled process such as `pip-compile --generate-hashes`, and review changes before updating it. 5. Restrict installation to a trusted Python package index or an internally controlled package mirror. 6. Prefer reviewed wheels and explicitly control whether source distributions are permitted. 7. Add automated vulnerability, provenance, and dependency-drift checks to release workflows. 8. Correct the README claim that versions are pinned until exact pins and hashes are actually used. 9. Run the Skill in a least-privileged environment without unnecessary credentials, sensitive mounts, or broad filesystem access.
