T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:36
- Finding
- Unpinned Third-Party Dependencies Permit Supply-Chain Substitution## Vulnerability Details **File Location**: `SKILL.md`, lines 36-38 **Vulnerability Type**: Unpinned and integrity-unverified dependencies **Risk Level**: Medium **Vulnerable Code**: ```bash pip install ezdxf # Additional dependencies for PDF watermarking: pip install PyPDF2 reportlab ``` ### Technical Analysis The installation instructions retrieve mutable versions of `ezdxf`, `PyPDF2`, and `reportlab` from the package index configured in the user's environment. No exact versions, lock file, trusted index, or package hashes are specified. Consequently, the installed code may differ between installations. Compromise of a package release, dependency account, package index, or local pip index configuration could cause an altered package to be installed. Python packages may execute code during installation and are subsequently imported directly by the project. This finding does not establish that the named dependencies are currently malicious. The weakness is the absence of controls that ensure users install the versions reviewed and expected by the project. ### Attack Path 1. An attacker compromises a dependency release channel or controls an index selected by the user's pip configuration. 2. The attacker publishes or serves a modified version of one of the documented dependencies. 3. A user follows the documented unpinned `pip install` command. 4. Pip resolves the attacker-controlled or compromised release because no version or hash is enforced. 5. Malicious code executes during installation or when the project imports the package. ### Impact Assessment A compromised dependency could execute arbitrary code with the privileges of the user installing or running the project. This could expose or modify accessible CAD documents, credentials, configuration files, and other user data. The scope is generally limited to the installing user's permissions unless installation is performed with elevated privileges.
- Remediation
- ## Remediation Suggestions - Define exact, reviewed dependency versions in a requirements or lock file. - Generate and verify cryptographic hashes for every package and transitive dependency. - Install with hash enforcement, such as `pip install --require-hashes -r requirements.txt`. - Document the trusted package index explicitly and prevent unintended fallback to untrusted indexes. - Regularly scan locked dependencies for known vulnerabilities and update them through a controlled review process. - Recommend installation in an isolated virtual environment without elevated privileges.
