T08 · Insecure Dependencies
- Location
install.sh:21- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk
- Content
View full analysis
/dev/null if [ $? -ne 0 ]; then echo "⚠️ 需要安装依赖库" echo "运行: pip install yfinance pandas numpy matplotlib scikit-learn" fi ``` The documentation similarly instructs users to install unpinned packages: ```bash pip install yfinance pandas numpy matplotlib ``` ### Technical Analysis The project recommends installing `yfinance`, `pandas`, `numpy`, `matplotlib`, and `scikit-learn` without version constraints, integrity hashes, or a reviewed lock file. Consequently, the code installed by a user can differ from the code that existed when this skill was audited. Python packages and their transitive dependencies may execute code during installation or when imported. If a future package release or transitive dependency is compromised, removed and replaced, or introduces malicious behavior, users following these instructions could install attacker-controlled code. The installer does not automatically execute `pip`, which limits direct exposure, but it explicitly directs users to run the unsafe command. No evidence was found that the named packages are currently malicious. The vulnerability is the absence of dependency pinning and integrity verification. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or the associated package-publishing account. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user installs the skill and sees the command printed by `install.sh`, or follows the installation command in `SKILL.md`. 4. The user runs the unpinned `pip install` command. 5. Package ...[truncated 725 chars]- Remediation
View remediation
