T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and Unverified Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-3
Vulnerability Type: Supply-chain exposure through unbounded dependencies without integrity verification
Risk Level: MediumComplete Code Snippet:
text baostock>=0.8.8 pandas>=1.3.0 numpy>=1.21.0The documented installation procedure in
README.md:33-37andREADME.md:197-199instructs users to install these dependencies directly:bash pip install -r requirements.txtTechnical Analysis
All dependencies specify only minimum versions using
>=. Consequently, future releases remain valid installation candidates, even though they were not available for review when the Skill was audited. The project also provides no lock file or cryptographic hashes to authenticate the exact distribution artifacts being installed.Dependency installation and subsequent imports execute third-party code. If an accepted package release, configured package index, or distribution artifact is compromised, the application can install and execute code that is outside the audited project. This risk applies particularly to fresh installations and dependency upgrades.
No evidence was found that the project intentionally references a typosquatted package or untrusted package repository. The finding concerns the absence of version reproducibility and artifact-integrity controls.
Attack Path
- An attacker compromises a future release of one of the listed packages, its publishing account, a configured package index, or the artifact delivery path.
- The malicious release retains a version satisfying the project's lower-bound constraint.
- A user follows the documented command
pip install -r requirements.txt. - The package resolver selects the compromised release because no exact version or trusted hash restricts it.
- Malicious dependency code executes during installation or when
baostock,pandas, ornumpyis imported by `scripts/ ...[truncated 815 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace lower-bound-only constraints with exact versions that have been reviewed and tested, for example
package==x.y.z. - Generate a reproducible lock file containing cryptographic hashes for all direct and transitive dependencies.
- Require hash verification during installation, such as:
bash pip install --require-hashes -r requirements.txt - Regenerate and review the lock file through a controlled dependency-update process rather than resolving arbitrary new releases during deployment.
- Configure installations to use an approved package index or an internally controlled artifact mirror.
- Run dependency vulnerability and provenance checks in continuous integration.
- Install and execute the Skill in a dedicated, least-privileged virtual environment or container, and avoid administrator-level installation.
- Replace lower-bound-only constraints with exact versions that have been reviewed and tested, for example
