T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 15
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code:
bash pip install akshare pandasTechnical Analysis
The installation command retrieves the latest available versions of
akshare,pandas, and their transitive dependencies. The project does not specify reviewed versions, package hashes, a dependency lockfile, an isolated environment, or an explicit trusted package index.Consequently, the installed code may change between executions and is not represented within the audited project. Python packages can execute code during installation or when imported. If a package release or transitive dependency is compromised, replaced, or unexpectedly changed, following this instruction could introduce unreviewed executable code into the user's environment.
Attack Path
- An attacker compromises a listed package, one of its transitive dependencies, or the package-distribution channel.
- The attacker publishes a malicious or modified release under a version accepted by the unpinned installation command.
- A user follows the documented instruction and runs
pip install akshare pandas. pipresolves and downloads the attacker-controlled release because no versions or hashes constrain dependency resolution.- Malicious code executes during package installation or later when the package is imported.
Impact Assessment
A compromised dependency could execute with the privileges of the user running
pipor Python. Potential impact includes access to files and environment variables available to that user, modification of the Python environment, arbitrary network communication, and execution of additional commands.The scope normally remains limited to the invoking user's permissions. If installation is performed as an administrator or with elevated privileges, the impact could extend to system-wide P ...[truncated 45 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every direct dependency to a reviewed, exact version.
-
Generate a lockfile that also constrains all transitive dependencies.
-
Record and verify cryptographic hashes for every downloaded distribution.
-
Install dependencies in a dedicated virtual environment rather than globally or with elevated privileges.
-
Explicitly configure the intended trusted package index and disable unintended fallback indexes.
-
Regularly scan pinned dependencies for known vulnerabilities and review updates before changing the lockfile.
-
Replace the mutable command with a hash-verified installation workflow, such as:
bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt
The referenced
requirements.txtshould contain exact versions and approved hashes for both direct and transitive dependencies.-
