T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependencies Permit Uncontrolled Supply-Chain Changes
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-2; installation documented atSKILL.md:125
Vulnerability Type: Unpinned and unhashed third-party dependencies
Risk Level: MediumVulnerable code snippet (
requirements.txt:1-2):text numpy scipyRelated installation instruction (
SKILL.md:125):text pip install -r requirements.txtTechnical Analysis
The dependency declarations do not specify exact versions or cryptographic hashes. Each installation can consequently resolve different package releases from the configured package index. This prevents reproducible dependency review and allows newly published, compromised, or otherwise unsafe artifacts to enter the execution environment without a corresponding source-code change in this project.
Python packages can execute code during installation or when imported. The application imports both dependencies in
scripts/main.py, so an unsafe resolved artifact could execute with the privileges of the user running the installation or analysis. Uncontrolled version drift can also change numerical behavior and undermine the integrity of pharmacokinetic results.Attack Path
- A user follows the documented instruction and runs
pip install -r requirements.txt. pipresolves the currently available versions ofnumpyandscipyfrom the user's configured package source because no versions or hashes are enforced.- An attacker compromises a package distribution channel, account, mirror, or artifact used by that environment.
- The resolver downloads the attacker-controlled artifact because the requirements file provides no reviewed version or hash constraint.
- Malicious package code executes during installation or when
scripts/main.pyimports the dependency.
This path requires compromise or malicious control of a dependency source or resolved artifact; the repository itself does not contain an embedded mali ...[truncated 489 chars]
- A user follows the documented instruction and runs
- Remediation
View remediation
Remediation Suggestions
- Pin each direct dependency to an exact, reviewed version, for example:
text numpy==<reviewed-version> scipy==<reviewed-version> - Generate and record cryptographic hashes for all direct and transitive artifacts, then install with:
bash python -m pip install --require-hashes -r requirements.txt - Use a lock-file workflow that captures transitive dependencies for each supported Python version and platform.
- Install only from approved package indexes over TLS, and disable untrusted extra indexes or mirrors.
- Automate dependency vulnerability and provenance scanning in CI.
- Apply dependency upgrades through a controlled process that reviews release provenance, security advisories, compatibility, and numerical regression results before updating the lock file.
- Perform installation and analysis in an isolated, least-privileged virtual environment or container.
- Pin each direct dependency to an exact, reviewed version, for example:
