T08 · Insecure Dependencies
- Location
scripts/requirements.txt:3- Finding
Unbounded Third-Party Dependency Resolution
- Content
View full analysis
Vulnerability Details
File Location:
scripts/requirements.txt:3-8
Additional Locations:SKILL.md:65,README.md:27,references/api_cheatsheet.md:8-10
Vulnerability Type: Mutable and unverified third-party dependencies
Risk Level: MediumVulnerable Code
text ncps>=1.0.1 torch>=2.0.0 numpy>=1.24.0 pandas>=2.0.0 # Optional (only needed for inspect_wiring.py --draw): matplotlib>=3.7.0The project instructs users to install these dependencies directly:
bash pip install -r scripts/requirements.txtThe API reference also presents an entirely unconstrained installation command:
bash pip install ncps torch numpy pandasTechnical Analysis
The dependency manifest specifies only minimum versions. It does not pin reviewed releases, impose upper bounds, provide cryptographic hashes, or include a lock file. Consequently, installation results can change over time as package indexes publish newer versions.
If an allowed upstream release or its distribution channel is compromised,
pipmay resolve and install the affected release without any change to this repository. Malicious package behavior could run through build or installation mechanisms and later when the dependency is imported by the scripts.The package names appear to be ordinary PyPI project names; the audit found no evidence that the repository intentionally references a typosquatted package or attacker-controlled index. The risk arises from mutable and unverified dependency resolution rather than a confirmed malicious dependency.
Attack Path
- An upstream dependency account, release process, build pipeline, or package-index distribution channel is compromised.
- A malicious release is published with a version satisfying one of the lower-bound-only constraints.
- A user follows the documented
pip installcommand. - The resolver selects the newer malicious release b ...[truncated 824 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every runtime dependency to a reviewed exact version rather than using minimum-version constraints.
- Generate and commit a lock file appropriate for the supported platforms and Python versions.
- Require cryptographic package hashes, such as a hash-locked requirements file installed with
pip install --require-hashes. - Use a trusted, explicitly configured package index or an internally controlled package mirror.
- Separate optional visualization dependencies such as
matplotlibfrom the core runtime dependency set. - Add automated dependency vulnerability and integrity scanning to the release process.
- Replace the unconstrained command in
references/api_cheatsheet.mdwith the same reviewed, hash-verified installation procedure used by the project. - Periodically update pinned versions through a controlled review and testing process rather than allowing automatic selection of future releases.
