T08 · Insecure Dependencies
Warning
- Location
- README.md:16
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:16-18` - `SKILL.md:41-44` - `SKILL.md:61-64` **Vulnerability Type**: Unverified and unpinned Python package installation **Risk Level**: Medium ### Vulnerable Code Snippets `README.md:16-18`: ```bash pip install edge-tts ``` `SKILL.md:41-44`: ```bash # Install edge-tts pip install edge-tts ``` `SKILL.md:61-64`: ```bash pip install edge-tts ``` ### Technical Analysis The installation instructions retrieve the latest available `edge-tts` package and its transitive dependencies without specifying an exact version, validating package hashes, or using a reviewed lockfile. Consequently, the code installed by users can change after the Skill itself has been audited. Python packages and their build systems can execute code during installation, while installed packages execute with the invoking user's privileges at runtime. If the upstream package, maintainer account, distribution infrastructure, or a transitive dependency is compromised, following these instructions could install malicious code. The instructions also do not recommend a virtual environment. Users may therefore install the package globally or with elevated privileges, unnecessarily increasing the potential effect of a compromised dependency. This is a supply-chain weakness rather than evidence that the current `edge-tts` package is malicious. ### Attack Path 1. An attacker compromises the upstream package, a maintainer account, or one of its unpinned transitive dependencies. 2. The attacker publishes a malicious version to the package source used by `pip`. 3. A user follows the documented `pip install edge-tts` instruction after the malicious release becomes current. 4. `pip` downloads the unverified package or dependency and may execute attacker-controlled build or installation logic. 5. The malicious component subsequently executes during installation or when the Skill invokes `edge-tts`. 6. The payload receives the privile ...[truncated 1014 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `edge-tts` and every transitive dependency to versions that have been reviewed and tested. 2. Generate a lockfile containing cryptographic hashes, such as a hash-locked `requirements.txt` produced with `pip-tools`. 3. Require hash verification during installation: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Document installation in an isolated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Do not recommend installation with `sudo`, as root, or into the system Python environment. 6. Review and update dependency pins through a controlled process that includes provenance checks, vulnerability scanning, and functional testing. 7. Keep the lockfile in the repository so the dependency set reviewed during the audit is the same dependency set installed by users. ]]>
