T08 · Insecure Dependencies
- Location
scripts/bsky:12- Finding
Automatic Installation of Unhashed and Loosely Pinned Dependencies
- Content
View full analysis
&2 python3 -m venv "$VENV_DIR" "$VENV_DIR/bin/pip" install -q -r "$SCRIPT_DIR/../requirements.txt" fi ``` `requirements.txt:1`: ```text atproto>=0.0.65,<0.1.0 ``` ### Technical Analysis On its first invocation, the launcher automatically creates a virtual environment and retrieves packages from the Python package index configured for `pip`. The dependency is specified as a version range rather than an exact version, and no cryptographic hashes or lockfile are supplied. Consequently, the code executed by the Skill is not limited to the source reviewed in this project. Any future `atproto` release matching the range, as well as its resolved transitive dependencies, may be downloaded and executed without repository-level review. The effective package source can also be influenced by the user's or environment's `pip` configuration. The audit found no evidence that the current dependency is malicious. The vulnerability is the absence of controls that ensure the installed artifact is the exact dependency set reviewed and approved by the Skill publisher. ### Attack Path 1. An attacker compromises an allowed release of the direct dependency, one of its transitive dependencies, or a package index trusted by the local `pip` configuration. 2. The user invokes `scripts/bsky` on a system where `scripts/venv` does not yet exist. 3. The wrapper silently creates the virtual environment and executes `pip install` using the broad dependency constraint. 4. `pip` resolves and installs the attacker-controlled or compromised package without checking repository-supplied hashes. 5. The package executes with the privileges ...[truncated 916 chars]- Remediation
View remediation
