T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:52
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 52 **Vulnerability Type**: Unpinned dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install akshare ``` ### Technical Analysis The installation instructions retrieve the latest available `akshare` release without specifying an exact version or verifying package integrity. Consequently, the code installed by users can change after this skill has been reviewed. This is a supply-chain weakness because a compromised upstream release, maintainer account, package distribution channel, or transitive dependency could introduce malicious code. Python packages may execute code during installation and subsequently run with the privileges of the user invoking the scanner. The project also lacks a lock file, hash-verified requirements file, or documented trusted version. The package metadata does not declare the Python dependency or constrain its transitive dependency graph. ### Attack Path 1. An attacker compromises the upstream `akshare` package, one of its dependencies, or the associated publishing credentials. 2. The attacker publishes a malicious version to the package index. 3. A user follows the documented `pip install akshare` command after that release becomes current. 4. `pip` downloads and installs the malicious release or dependency without a version or hash validation failure. 5. Malicious installation hooks or imported package code execute with the installing or scanning user's privileges. 6. The payload could read accessible files, alter scanner results, steal credentials, or establish persistence outside this project. This attack requires compromise of the upstream package or its dependency chain; no evidence in the audited files shows that the current `akshare` package is malicious. ### Impact Assessment Successful exploitation would provide code execution under the account that installs or runs the scanner. The accessible scope would include that ...[truncated 203 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `akshare` and all transitive dependencies to reviewed versions. - Maintain dependencies in a lock file or hash-verified requirements file, for example: ```text akshare==REVIEWED_VERSION \ --hash=sha256:REVIEWED_DISTRIBUTION_HASH ``` - Install with hash enforcement: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` - Review dependency updates before changing pins and use automated vulnerability and provenance checks. - Install dependencies inside an isolated virtual environment as an unprivileged user. - Avoid using `sudo pip` or otherwise installing the scanner's dependencies with administrative privileges. - Declare the Python runtime requirements explicitly instead of relying only on prose installation instructions. ]]>
