T08 · Insecure Dependencies
Warning
- Location
- scripts/install.sh:32
- Finding
- Unpinned Dependency Installation into the System Python Environment<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install.sh`, lines 32-34 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install --break-system-packages edge-tts 2>/dev/null || \ pip3 install --user edge-tts 2>/dev/null || \ pip3 install edge-tts 2>/dev/null ``` ### Technical Analysis The installation script downloads `edge-tts` without specifying the documented version or verifying the integrity of the downloaded artifacts. Although `SKILL.md` identifies version `7.2.8`, the installer resolves whichever release is current when installation occurs. The first installation attempt also uses `--break-system-packages`, bypassing Python protections intended to prevent `pip` from modifying an externally managed system environment. This can overwrite distribution-managed packages or create incompatible dependency combinations. This is a supply-chain risk rather than evidence that the current `edge-tts` package is malicious. Exploitation would require compromise of the package, its distribution account, the configured package index, or the dependency resolution path. ### Attack Path 1. An attacker compromises the package distribution account, package index, or another dependency resolved during installation. 2. The attacker publishes a malicious or altered release that satisfies the unrestricted package request. 3. A user executes `scripts/install.sh`. 4. `pip3` retrieves the mutable package release and executes its installation process. 5. Malicious installation or runtime code executes with the privileges of the user running the script. 6. If the installer is run by an administrator, or against a privileged Python environment, the impact extends to that privileged environment. ### Impact Assessment Successful supply-chain exploitation could allow arbitrary code execution under the invoking user's account, access to that user's files and environment variables, and m ...[truncated 355 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the documented dependency version: ```bash python3 -m pip install "edge-tts==7.2.8" ``` 2. Install dependencies in a dedicated virtual environment rather than modifying the system Python environment: ```bash python3 -m venv "$SKILL_DIR/.venv" "$SKILL_DIR/.venv/bin/python" -m pip install --require-hashes -r requirements.txt ``` 3. Create a locked requirements file containing exact versions and cryptographic hashes for all transitive dependencies. 4. Use `python -m pip` with the selected interpreter instead of invoking a potentially unrelated `pip3` executable. 5. Remove `--break-system-packages`. If system-wide installation is genuinely required, document it as a separate, explicit administrative operation. 6. Do not suppress all installation error output. Preserve diagnostic information so package source and integrity failures can be investigated. ]]>
