T08 · Insecure Dependencies
- Location
scripts-/install.sh:52- Finding
Unpinned Dependencies and Mutable Remote Source Installation
- Content
View full analysis
Vulnerability Details
File Location:
scripts-/install.sh:52-54,scripts-/install.sh:66-79,scripts-/install.sh:86-100,scripts-/transcribe.py:31-39, andscripts-/transcribe_quick.py:12-19
Vulnerability Type: Supply-chain exposure through unpinned packages and mutable remote source code
Risk Level: HighVulnerable Code
scripts-/install.sh:52-54:bash # 安装核心依赖 echo "🔧 安装核心依赖..." pip install faster-whisper torch --upgradescripts-/install.sh:66-79:bash if command -v brew &> /dev/null; then # macOS Homebrew brew install whisper-cpp echo "✓ Whisper.cpp (Homebrew) 已安装" elif command -v apt-get &> /dev/null; then # Ubuntu/Debian sudo apt-get update sudo apt-get install -y whisper-cpp echo "✓ Whisper.cpp (apt) 已安装" else # 源码编译 git clone https://github.com/ggerganov/whisper.cpp cd whisper.cpp && make cd .. echo "✓ Whisper.cpp (源码编译) 已安装" fiscripts-/install.sh:86-100:bash # 可选:安装高级 TTS 服务 echo "🎤 高级 TTS 服务(可选)" echo "" read -p "是否安装 Azure Cognitive Services SDK? [y/N] " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then pip install azure-cognitiveservices-speech echo "✓ Azure TTS SDK 已安装" fi read -p "是否安装 ElevenLabs CLI? [y/N] " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then pip install elevenlabs echo "✓ ElevenLabs SDK 已安装" fiscripts-/transcribe.py:31-39:python except ImportError: print("❌ faster-whisper 未安装,正在尝试安装...") import subprocess subprocess.check_call([sys.executable, "-m", "pip", "install", "faster-whisper"]) # 重试 from faster_whisper import WhisperModel model = WhisperModel("base", device="cpu") segments, info = model.transcribe(audio_path)scripts-/transcribe_quick.py:12-19:python try: # 安装依赖(如果未安装) subprocess.run([sys.executable, "-m", ...[truncated 2105 chars]- Remediation
View remediation
Remediation Suggestions
- Move all dependency installation into a separate, explicit setup process; transcription scripts must fail safely with installation instructions rather than invoking
pip. - Pin every direct and transitive Python dependency to an audited version in a lock file.
- Require package hashes, such as with
pip install --require-hashes. - Pin Git dependencies to a reviewed immutable commit and verify the expected commit or signed tag before building.
- Avoid
--upgradein reproducible installation flows. - Separate optional components into independently reviewed dependency groups.
- Avoid
sudofrom the Skill installer. Provide documented administrator commands for users who explicitly choose system-wide installation. - Use an isolated virtual environment with minimal filesystem and network permissions.
- Generate and retain a software bill of materials for release auditing.
- Move all dependency installation into a separate, explicit setup process; transcription scripts must fail safely with installation instructions rather than invoking
