T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 15–20 **Vulnerability Type**: Unpinned package installation from the active Python package index **Risk Level**: Medium ### Vulnerable Code ```markdown **Library**: `odfdo` v3.20+ — actively maintained, single dep (`lxml`), full ODF support. ## Required Setup ```bash pip install odfdo ``` ``` ### Technical Analysis The documented installation command retrieves `odfdo` without pinning an exact version or verifying package hashes. Although the text refers to version 3.20 or later, the command does not enforce that minimum version. As a result, the installed code is determined by the package index and dependency resolver at installation time. This makes the environment non-reproducible and allows future, compromised, or otherwise unreviewed releases of `odfdo` or its transitive dependencies to be installed. Python package installation may also execute package-controlled build or installation logic with the privileges of the user running pip. No evidence was found that the project itself hosts a malicious package or intentionally retrieves a malicious payload. The risk arises from unsafe dependency installation guidance. ### Attack Path 1. An attacker compromises an upstream `odfdo` release, one of its transitive dependencies, or the package-distribution channel. 2. A user follows the setup instructions and runs `pip install odfdo`. 3. pip resolves and downloads the currently selected package artifacts without checking project-supplied hashes or an audited lock file. 4. Malicious package installation logic may execute during installation, or malicious library code may execute when `scripts/odt_tool.py` imports and uses `odfdo`. 5. The payload runs with the privileges and environmental access of the user who installed or invoked the package. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the account running pip or the ODT utility. The resu ...[truncated 394 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin exact, reviewed versions of `odfdo` and every transitive dependency in a dependency lock file. 2. Record and verify cryptographic hashes for all package artifacts. For example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Generate the locked requirements from a trusted environment and review package names to reduce dependency-confusion and typosquatting risks. 4. Install dependencies in an isolated virtual environment rather than the system Python environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Use a trusted package index or an internally controlled package mirror where practical. 6. Avoid installing with administrator or root privileges. 7. Add automated dependency scanning and periodically update pins only after reviewing release provenance and security advisories. 8. Ensure the documented version requirement matches the enforced dependency specification. ]]>
