T08 · Insecure Dependencies
Warning
- Location
- INTEGRATION_TEST.md:112
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `INTEGRATION_TEST.md`, lines 112-119 **Vulnerability Type**: Unpinned dependency installation from the active Python package index **Risk Level**: Medium ### Vulnerable Code ```bash # Check the requests library python3 -c "import requests; print('OK')" # Test network connectivity curl -I https://dongniao.net/taxonomy.html # Install requests (if needed) python3 -m pip install requests ``` ### Technical Analysis The troubleshooting guide instructs users to install the `requests` package without specifying a reviewed version, verifying cryptographic hashes, using a lockfile, or explicitly selecting a trusted package index. Consequently, the package artifact is determined by the user's active pip configuration and the state of the configured repository at installation time. The executable imports this package in `scripts/bird_info_skill.py` and refuses to run from its command-line entry point when it is unavailable, even though `http_fetch()` contains a standard-library `urllib` fallback. This behavior encourages users to follow the unsafe installation instruction. An unpinned dependency is not inherently malicious, but this installation pattern weakens supply-chain integrity. Exploitation requires compromise or malicious control of a configured package source, a compromised upstream release, or another mechanism capable of supplying an attacker-controlled artifact under the expected package name. ### Attack Path 1. An attacker compromises the configured Python package source, an upstream package release, or a package mirror selected through the victim's pip configuration. 2. The user encounters the documented missing-dependency error. 3. The user follows the guide and runs `python3 -m pip install requests`. 4. Pip resolves and installs the attacker-controlled or compromised artifact without a pinned version or required hash. 5. Malicious code can execute during package installation or when the skill subsequentl ...[truncated 568 chars]
- Remediation
- ## Remediation Suggestions 1. Prefer the existing Python standard-library `urllib` implementation and remove the command-line check that makes `requests` mandatory. 2. If `requests` remains required, pin it to a reviewed exact version in a dependency or lock file. 3. Require cryptographic hashes, such as through a hash-locked requirements file and `pip install --require-hashes`. 4. Install only from an explicitly trusted HTTPS package index rather than relying on ambient pip configuration. 5. Review and update the lockfile through a controlled dependency-management process. 6. Avoid installing packages with elevated privileges and use an isolated virtual environment with minimal permissions. 7. Keep the declared skill requirements synchronized with the executable dependency requirements.
