T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and inconsistent third-party dependency installation
- Content
View full analysis
=1.10.0 pandas>=1.5.0 pandas-ta>=0.3.14b0 APScheduler>=3.9.0 requests>=2.28.0 pyyaml>=6.0 ``` `install.sh:45-55`: ```bash pip3 install akshare pandas APScheduler pyyaml -q 2>&1 | tee -a $LOG_FILE # 尝试安装 TA-Lib echo "" echo "5. 安装 TA-Lib..." if pip3 install TA-Lib -q 2>&1 | tee -a $LOG_FILE; then echo " ✅ TA-Lib 安装成功" else echo " ⚠️ TA-Lib 安装失败,尝试使用预编译包..." if pip3 install TA-Lib --only-binary :all: -q 2>&1 | tee -a $LOG_FILE; then ``` `SKILL.md:25-33`: ```yaml "install": [ { "id": "dependencies", "kind": "pip", "package": "akshare pandas pandas-ta APScheduler requests pyyaml", "label": "Install dependencies: pip3 install akshare pandas pandas-ta APScheduler requests pyyaml", }, ], ``` ### Technical Analysis The project installs packages without exact version pins or package hashes. The `>=` constraints allow any later release, while the direct `pip3 install` commands resolve the latest package versions available at installation time. The dependency definitions are also inconsistent. The Skill metadata requests `pandas-ta`, whereas `install.sh` installs `TA-Lib`. As a result, the effective dependency set depends on which installation method the user follows. This prevents reproducible security review and increases exposure to compromised releases, malicious maintainer updates, dependency substitution, and unexpected breaking changes. Python packages may execute code during build or installation, and imported packages execute module initialization code with the privileges of the invoking user. ### Attack Path 1. An attacker compromises a permitted dependency release, its maintainer ac ...[truncated 858 chars]- Remediation
View remediation
