T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-4
Vulnerability Type: Unpinned dependencies and missing package integrity verification
Risk Level: MediumVulnerable Code
text ete3 matplotlib numpy pandasThe installation instructions in
SKILL.md:31-37also install unconstrained versions:text Install dependencies: ```text pip install ete3 matplotlib numpy pandastext ### Technical Analysis All third-party dependencies are declared without exact versions, hashes, or a lockfile. Consequently, each installation may resolve to different package releases from the configured package index. This makes builds non-reproducible and prevents verification that downloaded artifacts are the versions reviewed by the project maintainers. No dependency confusion or typosquatting package was identified in the audited files; the documented package names are consistent with the imports. The security risk arises from unconstrained resolution and absent artifact-integrity controls. If an upstream package, package-index account, distribution artifact, or configured index is compromised, installation may retrieve attacker-controlled code. Python packages can execute code during installation, and package initialization code executes when imported by `scripts/main.py`. ### Attack Path 1. A threat actor compromises an upstream dependency release, maintainer account, distribution artifact, or package source used by pip. 2. A user follows the documented installation command or installs from `requirements.txt`. 3. Because no reviewed versions or hashes are enforced, pip resolves and downloads the compromised release. 4. Malicious code executes during package installation or when `scripts/main.py` imports the dependency. 5. The payload operates with the permissions of the user or agent running pip or the application. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the installer or application user ...[truncated 500 chars]- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed, exact version rather than allowing unconstrained resolution.
- Generate a fully resolved lock file that also pins transitive dependencies.
- Record cryptographic hashes for all accepted distributions and enforce them during installation, for example:
bash python -m pip install --require-hashes -r requirements.txt- Generate locked requirements through a controlled process, such as
pip-compile --generate-hashes, and review dependency changes before merging them. - Use a trusted or internally mirrored package index and explicitly configure approved sources.
- Add automated dependency vulnerability and provenance scanning to CI.
- Keep the installation command in
SKILL.mdsynchronized with the secured requirements file instead of instructing users to install unconstrained package names directly.
