T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:80
- Finding
- Unpinned Dependency Installation Through a Third-Party Package Mirror## Vulnerability Details **File Location**: `SKILL.md`, line 80 **Vulnerability Type**: Supply-chain risk caused by an unpinned dependency and an external package mirror **Risk Level**: Medium **Complete Code Snippet**: ```bash pip install --user edge-tts -i https://mirrors.aliyun.com/pypi/simple/ ``` ### Technical Analysis The Skill directs users or an executing agent to install `edge-tts` without specifying a reviewed version or verifying package hashes. It also overrides the default Python Package Index with a third-party mirror. Because the requested package version is mutable, a future installation may retrieve code that differs from the version available when the Skill was audited. A compromise of the upstream package, one of its transitive dependencies, or the configured mirror could cause malicious package content to be installed. Depending on the package distribution format and build process, package-controlled build logic may execute during installation. Installed malicious code could also execute when the TTS package is subsequently invoked. This is not evidence that the named package or mirror is currently malicious. The vulnerability is the absence of version and integrity controls around executable third-party dependencies. ### Attack Path 1. A user requests Chinese voice synthesis. 2. The environment does not already contain `edge-tts`. 3. The documented installation command is executed. 4. pip resolves the latest available package and transitive dependencies through the specified third-party mirror. 5. An attacker who has compromised the package, a dependency, or mirror-delivered artifacts supplies malicious package content. 6. Malicious logic executes during package build or installation, or later when the installed TTS component is invoked. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the account running pip or invoking the installed package. ...[truncated 360 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `edge-tts` and every transitive dependency to versions that have been reviewed and tested. 2. Record cryptographic hashes in a locked requirements file and install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Prefer the official PyPI index unless a mirror is operationally required. If a mirror is required, document its trust model and use a controlled repository that verifies artifacts against approved hashes. 4. Install dependencies inside an isolated virtual environment rather than directly into the user's package directory. 5. Prepackage or provision the approved dependency during deployment instead of allowing runtime installation in response to a voice request. 6. Disable source builds where practical and accept only reviewed binary artifacts: ```bash python -m pip install --only-binary=:all: --require-hashes -r requirements.txt ``` 7. Run TTS processing with least privilege and restrict its access to credentials, sensitive files, and unnecessary network destinations.
