T08 · Insecure Dependencies
Error
- Location
- scripts/run.sh:31
- Finding
- Automatic Installation of Unpinned Third-Party Dependencies## Vulnerability Details **File Location**: `scripts/run.sh:31-32`; `requirements.txt:1-3` **Vulnerability Type**: Supply-chain exposure through unconstrained dependency installation **Risk Level**: High ### Vulnerable Code ```bash log_info "Checking dependencies..." "$PIP_BIN" install -q -r "$REQUIREMENTS_FILE" ``` ```text Pillow>=9.0.0 rembg>=2.0.0 onnxruntime>=1.14.0 ``` ### Technical Analysis The launcher automatically invokes `pip install` whenever the Skill runs. Every dependency uses an open-ended minimum-version constraint rather than an exact version, and the project provides no lockfile, package hashes, or explicit trusted package index. Consequently, the code reviewed during this audit does not fully determine the code that will execute in future runs. Pip may select newer direct dependencies and mutable transitive dependencies published after the audit. Package installation and subsequent imports can execute third-party code under the account running the Skill. This does not prove that the currently named packages are malicious. The vulnerability is the absence of controls that ensure future installations use the reviewed dependency artifacts. ### Attack Path 1. An attacker compromises a permitted package release, one of its transitive dependencies, or the package index/resolution path used by pip. 2. The attacker publishes a release satisfying one of the unbounded `>=` constraints. 3. A user invokes `scripts/run.sh`. 4. The launcher automatically resolves and installs the affected release from the configured pip source. 5. Malicious code executes during package installation, module import, or normal dependency operation. 6. The code runs with the filesystem, network, environment-variable, and process privileges of the user who launched the Skill. ### Impact Assessment Successful exploitation can provide arbitrary code execution with the invoking user's privileges. The attacke ...[truncated 311 chars]
- Remediation
- ## Remediation Suggestions 1. Replace open-ended dependency constraints with exact, reviewed versions. 2. Generate a lockfile containing all direct and transitive dependencies. 3. Require cryptographic hashes, for example through pip's `--require-hashes` option and a hash-locked requirements file. 4. Configure an explicit trusted package index or an internally controlled package mirror. 5. Run dependency vulnerability and provenance checks before updating locked versions. 6. Separate environment provisioning from ordinary Skill execution. Do not silently install or upgrade packages every time the image processor runs. 7. Require explicit user approval before network-backed package installation. 8. Consider executing the dependency installation and image processing in a restricted container with minimal filesystem and network access.
