T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned and Unnecessary Third-Party Dependencies## Vulnerability Details **File Location**: `requirements.txt:1-3` **Vulnerability Type**: Supply-chain exposure through unpinned and unnecessary dependencies **Risk Level**: Medium ### Vulnerable Code ```text dataclasses enum rdkit ``` The installation workflow is documented in `SKILL.md:210-215`: ```text # Python dependencies pip install -r requirements.txt ``` ### Technical Analysis Every dependency is declared without a fixed version or integrity hash. Consequently, separate installations can resolve to different package releases whose content was not part of this audit. The project declares Python 3.8 or later, where `dataclasses` and `enum` are standard-library modules. Installing third-party packages with these names is unnecessary and creates avoidable module-shadowing and dependency-confusion exposure. Of the listed packages, only RDKit is required as a third-party dependency by the audited implementation. Because Python packages and their installation mechanisms may execute code during installation, dependency resolution from an untrusted or compromised index can lead to arbitrary code execution under the privileges of the user performing the installation. ### Attack Path 1. A user follows the documented setup instructions and runs `pip install -r requirements.txt`. 2. `pip` resolves mutable, unpinned package names through its configured package index or mirror. 3. An attacker compromises a referenced package release or controls a package/index selected by the environment. 4. The attacker-controlled distribution is downloaded and installed. 5. Malicious installation or imported package code executes with the privileges of the installing or runtime user. This path requires compromise or attacker influence over dependency resolution; the audited repository itself does not contain a remote payload. ### Impact Assessment Successful exploitation could execute arbitrary code within the installation environment. The resulting access is bounded b ...[truncated 343 chars]
- Remediation
- ## Remediation Suggestions 1. Remove `dataclasses` and `enum` because they are included in the standard library for the documented Python 3.8+ runtime. 2. Pin RDKit to a reviewed, compatible version rather than allowing unrestricted resolution. 3. Generate a lock file containing cryptographic hashes and require hash verification during installation. 4. Install dependencies only from an approved package index or controlled internal mirror. 5. Perform installation in a dedicated, least-privileged virtual environment or container. 6. Add automated dependency vulnerability and provenance checks to the release process. 7. Periodically update the pinned dependency through a documented review and testing process.
