T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unbounded Third-Party Dependency Installation
- Content
View full analysis
=1.44 requests>=2.31 ``` `deploy/bootstrap_project.sh:23-27`: ```bash echo "[project] installing python dependencies" "${PROJECT_ROOT}/.venv/bin/pip" install --upgrade pip "${PROJECT_ROOT}/.venv/bin/pip" install -r "${PROJECT_ROOT}/requirements.txt" echo "[project] installing playwright chromium into this project environment" "${PROJECT_ROOT}/.venv/bin/python" -m playwright install chromium ``` ### Technical Analysis The dependency constraints specify only minimum versions. Consequently, every installation may retrieve different future releases of Playwright, Requests, and their transitive dependencies. The bootstrap script also upgrades pip without pinning its version and dynamically downloads a Playwright-managed Chromium artifact. This prevents the reviewed source tree from defining a reproducible dependency set. A compromised package release, poisoned transitive dependency, malicious registry response, or incompatible future package can become part of the effective executable payload after the Skill has already been reviewed. No evidence of a currently malicious package or dependency-confusion package name was found. The risk arises from uncontrolled future dependency and browser-artifact resolution. ### Attack Path 1. An attacker compromises a permitted future version of a direct or transitive dependency, or the distribution channel used for a Playwright browser artifact. 2. An administrator or agent invokes `deploy/bootstrap_project.sh`. 3. The minimum-only constraints permit pip to select the compromised release. 4. Package installation code, imported package code, or the downloaded browser executes under ...[truncated 799 chars]- Remediation
View remediation
` and `requests==`. 2. Generate a lock file containing all transitive dependencies and require hashes, such as with `pip-compile --generate-hashes`. 3. Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Remove the unconditional pip upgrade or pin pip to a reviewed version. 5. Pin the Playwright version and browser revision as a tested pair. 6. Download browser artifacts only from an approved source and verify their integrity where the deployment process permits it. 7. Run project bootstrap as a dedicated unprivileged account, never as root. 8. Use an internal package mirror or allowlisted package repository for production deployment. ]]>
