T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Unpinned Third-Party Dependencies Permit Supply-Chain Compromise<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:8-9, 42-43`; `references/workflow.md:29-44`; `scripts/download_video.py:38-40` **Vulnerability Type**: Unpinned and integrity-unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:8-9`: ```yaml pip: - openai-whisper ``` `SKILL.md:42-43`: ```bash python3 -c "import whisper" # Missing → pip3 install openai-whisper pip3 list 2>/dev/null | grep -q yt-dlp # Missing → pip3 install yt-dlp ``` `references/workflow.md:29-44`: ```markdown 1. Tell the user exactly which tools/packages are missing, such as "python3, ffmpeg, openai-whisper" 2. Show the complete installation command, such as `brew install python3 ffmpeg && pip3 install openai-whisper` | Platform | Python3 | ffmpeg | openai-whisper | |----------|---------|--------|-----------------| | macOS | `brew install python3` | `brew install ffmpeg` | `pip3 install openai-whisper` | | Ubuntu/Debian | `apt install python3` | `apt install ffmpeg` | `pip3 install openai-whisper` | | Windows | Download from python.org | `winget install ffmpeg` | `pip install openai-whisper` | ### yt-dlp pip3 install yt-dlp ``` `scripts/download_video.py:38-40`: ```python print("❌ 未找到 yt-dlp,请先安装:") print(" brew install yt-dlp") print(" 或: pip3 install yt-dlp") ``` ### Technical Analysis The Skill declares and recommends installing `openai-whisper` and `yt-dlp` without exact version constraints, cryptographic hashes, a lock file, or an explicitly trusted package index. As a result, installation resolves whatever package release and transitive dependency versions are available from the configured package repositories at execution time. User confirmation before installation prevents silent package installation, but it does not verify the integrity or provenance of the selected artifacts. A compromised upstream release, package repository, maintainer account, transitive dependency, or locally configured package in ...[truncated 2207 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed exact version: ```text openai-whisper==<reviewed-version> yt-dlp==<reviewed-version> ``` 2. Maintain a lock file that records all transitive dependencies. Generate and review it in a controlled environment rather than resolving dependencies dynamically during normal Skill execution. 3. Require cryptographic hashes for downloaded Python distributions, for example through a hash-locked requirements file and: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 4. Install dependencies in an isolated virtual environment instead of the user's global Python environment: ```bash python3 -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements.lock ``` 5. Use an explicitly configured trusted package index or an internally mirrored repository containing reviewed artifacts. Do not rely implicitly on arbitrary user or system package-index configuration. 6. Pin or otherwise control Homebrew and operating-system package versions where practical, and document the expected repositories and package provenance. 7. Document Whisper model download sources and expected checksums. Verify model artifacts before loading them where the supporting library permits this. 8. Continue requiring explicit user approval, but expand the prompt to display the exact pinned versions, source repository, installation target, and integrity-verification method. 9. Periodically update dependency pins through a controlled review process that includes vulnerability scanning, provenance checks, and regression testing. ]]>
