T08 · Insecure Dependencies
- Location
SKILL.md:148- Finding
Unpinned Third-Party Dependencies Installed Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 148-152
Vulnerability Type: Unpinned and unverified third-party dependencies
Risk Level: MediumVulnerable Code Snippet:
markdown ## Installation ```bash pip install akshare baostock yfinancetext ### Technical Analysis The installation instructions retrieve the latest available versions of `akshare`, `baostock`, and `yfinance` without version constraints, cryptographic hashes, a lockfile, or an explicitly approved package index. Consequently, the installed artifacts can change after the skill has been audited. Python packages can execute package-controlled code during installation and whenever imported. If a dependency release, transitive dependency, maintainer account, or configured package index is compromised, following this command could install attacker-controlled code. The project does not itself contain a malicious dependency or embedded payload; the issue is the absence of supply-chain controls around mutable external packages. ### Attack Path 1. An attacker compromises a named dependency, one of its transitive dependencies, its publishing account, or a package index used by the target environment. 2. The attacker publishes a malicious version that remains compatible with the unrestricted package names. 3. A user follows the documented `pip install` command. 4. `pip` resolves and installs the attacker-controlled release because no reviewed version or hash is required. 5. Malicious package code executes during installation or when the skill imports and uses the package. ### Impact Assessment Successful exploitation could execute arbitrary Python code with the privileges of the account performing installation or running the skill. Depending on that account's permissions, this may expose accessible files, environment variables, API credentials, financial-query data, and network resources. It could also modify files or install ...[truncated 232 chars]- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed exact version, for example with
package==version. - Generate a lockfile that also fixes all transitive dependency versions.
- Require cryptographic hashes during installation, such as through a hash-locked requirements file and
pip install --require-hashes. - Use an explicitly configured, trusted package index or an internally controlled package mirror.
- Scan dependency artifacts and review release provenance before updating pinned versions.
- Perform installation and execution in an isolated virtual environment or container under a non-administrative account.
- Establish a controlled update process in which dependency changes are reviewed, tested, and re-audited before deployment.
- Pin every direct dependency to a reviewed exact version, for example with
