T08 · Insecure Dependencies
Warning
- Location
- README.md:19
- Finding
- Unpinned Third-Party Dependencies Allow Uncontrolled Package Resolution## Vulnerability Details **File Location**: `README.md:19` **Vulnerability Type**: Unpinned and unverified third-party dependencies **Risk Level**: Medium ```bash pip install requests beautifulsoup4 chromadb ``` ### Technical Analysis The documented installation command installs three third-party packages without version constraints, a lockfile, or cryptographic hash verification. Consequently, each installation resolves whatever package versions the configured Python package index serves at that time rather than a reproducible, previously reviewed dependency set. This creates a supply-chain exposure: compromise of an upstream package release, dependency account, or package-index resolution path could cause users to install attacker-controlled code. Python packages may execute code during installation, and imported packages execute module initialization code at runtime. The audit did not identify evidence that the currently named packages are malicious. The risk arises from uncontrolled future package resolution and absent integrity controls. ### Attack Path 1. An attacker compromises an upstream dependency release process, maintainer account, or package-index resolution path. 2. The attacker publishes or causes delivery of a malicious version of `requests`, `beautifulsoup4`, `chromadb`, or a transitive dependency. 3. A user follows the installation command from `README.md`. 4. `pip` resolves and installs the uncontrolled malicious release because no reviewed versions or hashes are required. 5. Attacker-controlled code executes during package installation or when the application imports the affected package. ### Impact Assessment Malicious package code would ordinarily execute with the privileges of the user running `pip` or launching the application. It could access files, environment variables, local application data, and network resources available to that account. If installation is performed with elevated privi ...[truncated 273 chars]
- Remediation
- ## Remediation Suggestions 1. Define direct dependencies using exact, reviewed versions in a dependency manifest. 2. Generate and commit a lockfile that includes the complete transitive dependency graph. 3. Record and enforce cryptographic hashes for all resolved artifacts, such as with: ```bash pip install --require-hashes -r requirements.txt ``` 4. Configure installation to use a trusted package index and avoid unreviewed alternate indexes. 5. Add automated dependency vulnerability and provenance scanning to the release workflow. 6. Regularly update dependencies through reviewed changes rather than resolving mutable latest versions during installation. 7. Perform installation in an isolated virtual environment under a non-privileged account.
