T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:16
- Finding
- Unpinned Third-Party Dependencies## Vulnerability Details **File Location**: `SKILL.md:16-20` **Vulnerability Type**: Supply-chain risk from unpinned dependencies **Risk Level**: Medium **Complete Code Snippet**: ```markdown ## 安装依赖 ```bash pip install pytdx akshare requests pandas ``` ``` ### Technical Analysis The documented installation command installs four third-party packages without version constraints or integrity hashes. Consequently, the packages and transitive dependencies installed can change over time without any corresponding change to the reviewed Skill. Package installation may execute package build hooks or other installation-time code with the privileges of the user running `pip`. If a future release or transitive dependency is compromised, users following this instruction could execute attacker-controlled code. The current audit found no evidence that the named dependencies are intentionally malicious; the issue is the absence of reproducible, integrity-verified dependency resolution. ### Attack Path 1. An attacker compromises one of the named packages, its release process, its package-index account, or a transitive dependency. 2. The attacker publishes a malicious release that remains compatible with the unrestricted package names. 3. A user follows the documented `pip install` command. 4. Package resolution selects and downloads the compromised release. 5. Malicious installation hooks or imported package code execute with the installing user's privileges. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the account running the installation or Skill. Depending on that account's privileges, an attacker could read or modify accessible files, access user-level credentials, alter application behavior, or establish further persistence. The impact is normally limited to the installing user's permissions unless installation is performed with elevated privileges.
- Remediation
- ## Remediation Suggestions 1. Add a reviewed dependency manifest with exact versions for every direct and transitive dependency. 2. Generate and verify cryptographic hashes, then install with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Use an automated lock-file workflow to ensure reproducible resolution. 4. Configure the official, trusted package index explicitly and disallow unexpected supplemental indexes. 5. Scan locked packages for known vulnerabilities and review dependency updates before merging them. 6. Install dependencies in an isolated virtual environment as an unprivileged user; do not use system-wide or administrative installation unless required. 7. Regenerate the lock file and hashes only through a controlled dependency-update process.
