T08 · Insecure Dependencies
Warning
- Location
- scripts/send_feishu_voice.sh:64
- Finding
- Unpinned Third-Party Dependency Installation## Vulnerability Details **File Location**: `SKILL.md:57-58` and `scripts/send_feishu_voice.sh:64-70` **Vulnerability Type**: Unpinned third-party dependency and unsafe executable resolution **Risk Level**: Medium The installation guidance recommends obtaining `edge-tts` from PyPI without a version constraint, hash verification, or lockfile: ```text - 缺少依赖:按报错安装(例如 `python3 -m pip install --user edge-tts`) ``` The script then executes either an `edge-tts` program discovered through `PATH`, a fixed user-local executable, or the installed Python module: ```bash EDGE_TTS_CMD="" if command -v edge-tts >/dev/null 2>&1; then EDGE_TTS_CMD="edge-tts" elif [[ -x "$HOME/Library/Python/3.14/bin/edge-tts" ]]; then EDGE_TTS_CMD="$HOME/Library/Python/3.14/bin/edge-tts" else # 尝试 python 模块方式 if python3 -m edge_tts --help >/dev/null 2>&1; then EDGE_TTS_CMD="python3 -m edge_tts" else echo "edge-tts not found. install with: python3 -m pip install --user edge-tts" >&2 exit 6 fi fi ``` ### Technical Analysis The documented command installs the latest dependency version and its transitive dependencies from the configured Python package index. The project does not constrain the version, verify package hashes, provide a lockfile, or identify a reviewed artifact. Consequently, the effective code installed by users can change after this Skill has been reviewed. In addition, `command -v edge-tts` trusts the first matching executable in the caller's `PATH`. A malicious or compromised executable earlier in `PATH` would be selected without validating its location or integrity. This is a supply-chain weakness rather than evidence that the currently named package is malicious. ### Attack Path 1. An attacker compromises a future package release, a transitive dependency, the configured package index, or places a malicious `edge-tts` executable earlier in the victim's `PATH`. 2. ...[truncated 826 chars]
- Remediation
- ## Remediation Suggestions - Pin `edge-tts` and its transitive dependencies to reviewed versions in a lockfile or constraints file. - Require package hashes, such as with `pip install --require-hashes -r requirements.txt`. - Install dependencies in a dedicated virtual environment rather than the user's general environment. - Document the approved package index and prevent fallback to untrusted indexes. - Resolve the executable to an expected absolute path and reject unexpected locations. - Prefer invoking a dependency from the controlled virtual environment, for example `$VENV/bin/python -m edge_tts`. - Periodically review and update pinned dependencies after integrity and security checks.
