T08 · Insecure Dependencies
Warning
- Location
- INSTALL.sh:23
- Finding
- Unpinned Dependency Installed from a Third-Party Package Mirror## Vulnerability Details **File Location**: `INSTALL.sh:23`; also documented in `SKILL.md:59-62`, `SKILL.md:175-177`, and `README.md:18` **Vulnerability Type**: Uncontrolled third-party dependency resolution **Risk Level**: Medium **Vulnerable Code**: ```bash # Install edge-tts echo "📦 Installing edge-tts..." pip3 install edge-tts -i https://pypi.tuna.tsinghua.edu.cn/simple ``` ### Technical Analysis The installation script retrieves `edge-tts` without specifying a reviewed version or validating package hashes. Consequently, the installed code depends on whichever release the configured package index resolves at installation time. The executable installer defaults to the Tsinghua package mirror, although other project documentation describes the dependency as coming from official PyPI. A package mirror is not inherently malicious, but using an unpinned package from any mutable index expands the supply-chain trust boundary. A compromised upstream release, compromised mirror, or unexpectedly incompatible future version could change the code installed after this Skill has been audited. The script subsequently imports the installed package: ```bash python3 -c "import edge_tts; print(' ✅ edge-tts installed successfully')" ``` Python module-level code executes during import. Therefore, malicious code introduced into a resolved package release would execute with the permissions of the user running the installer. ### Attack Path 1. An attacker compromises the upstream `edge-tts` distribution channel, an applicable package release, or the configured mirror. 2. The attacker publishes or serves a modified package version containing malicious module-level code. 3. A user runs `INSTALL.sh`. 4. Because no version or hash is enforced, pip resolves and installs the attacker-controlled release. 5. The installer runs `import edge_tts`, executing its module-level code. 6. The malicious dependency can access resources ava ...[truncated 618 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `edge-tts` to a specific version reviewed and tested by the project: ```bash python3 -m pip install 'edge-tts==REVIEWED_VERSION' --index-url https://pypi.org/simple ``` 2. Maintain a requirements or lock file containing cryptographic hashes, and install with hash verification: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Use official PyPI as the default index. If mirrors are supported, require users to opt into them explicitly and document the additional trust boundary. 4. Use `python3 -m pip` rather than an independently resolved `pip3` executable to ensure the dependency is installed into the same interpreter used by the Skill. 5. Review dependency updates before changing the pinned version, and use automated dependency scanning to identify known vulnerabilities. 6. Prefer an isolated virtual environment instead of modifying the caller's global Python environment.
