T08 · Insecure Dependencies
Warning
- Location
- scripts/setup.sh:13
- Finding
- Unpinned and Ecosystem-Mismatched Third-Party Dependencies## Vulnerability Details **File Location**: `scripts/setup.sh:13-15`, `README.md:21-24`, `package.json:37-40` **Vulnerability Type**: Uncontrolled third-party dependency resolution and package ecosystem mismatch **Risk Level**: Medium ### Vulnerable Code `scripts/setup.sh:13-15`: ```bash # Install requests library (the only dependency) echo "📦 Installing Python dependencies..." pip3 install requests --quiet ``` `README.md:21-24`: ```bash pip install edge-tts # English/Japanese TTS pip install requests # SenseAudio HTTP calls ``` `package.json:37-40`: ```json "dependencies": { "requests": "^2.31.0", "edge-tts": "^6.1.0" }, ``` ### Technical Analysis The installation instructions resolve Python packages from an external package index without exact version pins or cryptographic hashes. The effective code installed can therefore change over time without any modification to the reviewed Skill. The project also declares `requests` and `edge-tts` in the npm `dependencies` section, even though the executable scripts import Python modules. npm and pip are separate package ecosystems: an npm dependency with the same name is not the Python package used by the scripts. Running npm installation may consequently download unrelated Node.js packages and execute any lifecycle scripts they define while failing to install the required Python dependencies. No malicious dependency payload is embedded in the audited repository. This finding concerns avoidable supply-chain exposure and does not establish that the currently resolved packages are malicious. ### Attack Path 1. A user runs `scripts/setup.sh`, follows the README commands, or runs npm installation based on `package.json`. 2. pip or npm resolves mutable package versions from its configured external registry. 3. An upstream release, compromised maintainer account, package-index substitution, malicious registry mirror, or unintended same-name npm p ...[truncated 1152 chars]
- Remediation
- ## Remediation Suggestions 1. Create a Python requirements lock file containing exact, reviewed versions: ```text requests==<reviewed-version> edge-tts==<reviewed-version> ``` 2. Generate and verify cryptographic hashes for every Python distribution, then install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Use a dedicated virtual environment rather than modifying the user's global Python installation: ```bash python3 -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements.txt ``` 4. Remove the Python package names from the npm `dependencies` field. If the project has no Node.js runtime component, remove unnecessary npm dependency metadata entirely. 5. Update `setup.sh` and the README so that both install all required Python dependencies exclusively from the reviewed lock file. 6. Perform intentional dependency upgrades through a controlled review process, including package provenance, checksum, vulnerability, and maintainer-change checks. 7. Avoid running dependency installation as root or through `sudo`; use the minimum privileges required.
