T08 · Insecure Dependencies
- Location
install.sh:8- Finding
Unpinned System-Wide Python Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
install.sh, lines 8–12
Vulnerability Type: Unpinned third-party dependency installation with managed-environment protections bypassed
Risk Level: MediumVulnerable Code
bash pip install --break-system-packages --quiet google-genai 2>/dev/null || { echo "⚠️ pip install failed, trying without --break-system-packages..." pip install --quiet google-genai 2>/dev/null || { echo "❌ Failed to install google-genai. Install manually: pip install google-genai" exit 1 } }Technical Analysis
The installer downloads and installs the latest version of
google-genai, together with its transitive dependencies, from the invoking environment's configured Python package index. It provides no version constraint, lockfile, package hash, or other integrity verification. Consequently, the code installed by the Skill can change without any modification to the reviewed project.The first installation attempt also uses
--break-system-packages, which bypasses Python's externally managed environment protection. This can alter the host's system-level Python environment rather than confining the dependency to an isolated virtual environment. Suppression of standard error with2>/dev/nullfurther reduces visibility into package-resolution warnings and installation failures.This is a supply-chain weakness rather than evidence that the current
google-genaipackage is malicious. Exploitation depends on compromise of a selected package release, a transitive dependency, the configured package index, or the package-resolution path.Attack Path
- An attacker compromises a future
google-genairelease, one of its transitive dependencies, or a Python package index configured on the target system. - A user executes
install.sh. pipresolves the mutable, unconstrained package set and downloads the attacker-controlled component.- Malic ...[truncated 1165 chars]
- An attacker compromises a future
- Remediation
View remediation
Remediation Suggestions
- Pin
google-genaiand all transitive dependencies to reviewed versions using a lockfile. - Require package hashes, such as with
pip install --require-hashes -r requirements.txt, to verify artifact integrity. - Install dependencies in a dedicated virtual environment rather than modifying the system Python environment.
- Remove
--break-system-packages; fail safely if no isolated environment is available. - Use an explicitly trusted package index and, where practical, an organization-controlled package mirror.
- Do not suppress all installation errors. Preserve security warnings and resolver diagnostics while keeping routine output concise.
- Periodically review and update pinned dependencies through a controlled process that includes vulnerability scanning and testing.
- Pin
