T08 · Insecure Dependencies
- Location
scripts/bootstrap_env.sh:29- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts/bootstrap_env.sh, lines 29–36
Vulnerability Type: Supply-chain exposure caused by unpinned dependencies and mutable package sources
Risk Level: Mediumzsh status "ensuring pip exists" "$PYTHON_BIN" -m ensurepip --upgrade >/dev/null 2>&1 || true status "ensuring soco is installed" if ! "$PYTHON_BIN" -c 'import soco' >/dev/null 2>&1; then "$PIP_BIN" install --upgrade pip soco fiTechnical Analysis
The bootstrap script installs the latest available versions of
pipandsocowithout version constraints, a lock file, or cryptographic hashes. It also relies on pip's configured package index rather than explicitly enforcing a reviewed HTTPS source.Consequently, the installed artifacts can change between executions. A compromised upstream release, package repository, dependency, package-index configuration, or network trust boundary could cause attacker-controlled Python code to be installed. The script's preliminary
import sococheck also executes the installed package to determine whether installation is needed.Attack Path
- An attacker compromises a relevant package release, transitive dependency, configured package index, or package-delivery trust boundary.
- The user runs
scripts/install.sh, which invokesscripts/bootstrap_env.sh. - If
socois not importable, the script executespip install --upgrade pip soco. - Pip resolves and installs mutable, unverified package versions from its configured source.
- Attacker-controlled package code can execute when
socois imported by the bootstrap check or subsequent playback workflow.
Exploitation depends on compromise or malicious configuration of the external dependency supply chain; the audited project itself does not contain an embedded malicious payload.
Impact Assessment
Malicious dependency code would execute with the privileges of the user running the installe ...[truncated 337 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
pip,soco, and all transitive dependencies to reviewed versions. - Generate and maintain a lock or requirements file containing SHA-256 hashes.
- Install with
--require-hashes, for example:zsh "$PYTHON_BIN" -m pip install \ --require-hashes \ --only-binary=:all: \ -r "$SKILL_DIR/requirements.lock" - Explicitly enforce an approved HTTPS package index rather than inheriting an arbitrary user or system pip configuration.
- Avoid silently upgrading pip during bootstrap; provision a reviewed, pinned version instead.
- Perform dependency vulnerability and provenance checks when updating the lock file.
- Consider validating installation metadata without importing untrusted package code during the bootstrap process.
- Pin
