T08 · Insecure Dependencies
Warning
- Location
- install.sh:7
- Finding
- Unpinned Dependency Installation into the System Python Environment## Vulnerability Details **File Location**: `install.sh:7-13` **Vulnerability Type**: Unpinned third-party dependency and unsafe system-wide package installation **Risk Level**: Medium **Complete Code Snippet**: ```bash # Install Python dependencies 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 retrieves `google-genai` without an exact version constraint or cryptographic hash verification. Consequently, installation behavior depends on whichever package version and transitive dependencies the package index serves at execution time, rather than on a dependency set covered by this audit. The first installation attempt also uses `--break-system-packages`, bypassing Python's externally managed environment safeguard. This can modify the shared system Python environment and interfere with packages used by unrelated applications. Although the package name is consistent with the documented dependency and no typo-squatting or untrusted package index was identified, the dependency installation remains mutable and executes code outside the reviewed project. ### Attack Path 1. A user runs `bash install.sh`. 2. The installer invokes `pip` against the default package index without a version pin or required hashes. 3. `pip` resolves the latest available `google-genai` release and its transitive dependencies. 4. If a future release, distribution artifact, package-index account, or transitive dependency is compromised, malicious installation or runtime code is placed in the Python environment. 5. The malicious code executes with the privileges of the user running the installer or when the Skill subsequently imports th ...[truncated 764 chars]
- Remediation
- ## Remediation Suggestions 1. Create and use a dedicated virtual environment rather than modifying the system Python installation. 2. Remove the `--break-system-packages` option. 3. Pin `google-genai` and all transitive dependencies to reviewed versions in a lock file or requirements file. 4. Require cryptographic hashes, for example with `pip install --require-hashes -r requirements.txt`. 5. Use an explicitly trusted package index and disable unintended additional indexes where practical. 6. Run dependency vulnerability and provenance checks during release preparation. 7. Update `SKILL.md` metadata and installation instructions to reference the same pinned dependency set.
