T08 · Insecure Dependencies
- Location
SKILL.md:210- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 210 and 301
Vulnerability Type: Unpinned and unverified package installation
Risk Level: MediumComplete Code Snippets
Line 210:
text | `ModuleNotFoundError: matplotlib` | matplotlib is not installed | Run `pip3 install matplotlib`, then check the network connection and configuration before retrying |Line 301:
text | matplotlib is not installed | matplotlib is missing or installed incorrectly | Run `python3 -c "import matplotlib"`; if it produces no output, matplotlib must be installed. | Run `pip3 install matplotlib` to install matplotlib. |The English descriptions above translate the surrounding table text faithfully; the security-relevant command appears verbatim.
Technical Analysis
The Skill directs users to install
matplotlibthrough pip without specifying a reviewed version, validating package hashes, using a dependency lockfile, identifying a trusted package index, or requiring an isolated environment. The selected package and its transitive dependencies therefore remain mutable and depend on the invoking system's pip configuration.This is a supply-chain weakness rather than evidence that
matplotlibitself is malicious. If the configured package repository, a future package release, or a transitive dependency is compromised, attacker-controlled installation or runtime code could execute under the invoking user's account. The installation is also non-reproducible because different invocations may resolve different artifacts.Attack Path
- A user invokes the Skill and encounters the documented missing-module condition.
- The user follows the instruction and runs
pip3 install matplotlib. - Pip resolves an unpinned release and its transitive dependencies from the configured package index.
- An attacker who has compromised a resolved release, dependency, or configured index serves a malicious artifact.
- Malicious installation hooks or impo ...[truncated 1137 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
matplotliband every transitive dependency to reviewed versions through a lockfile. - Require cryptographic hashes for downloaded artifacts, such as with a hash-pinned requirements file and
pip install --require-hashes -r requirements.txt. - Explicitly identify the approved package index and prevent unexpected fallback to untrusted or internally misconfigured indexes.
- Install dependencies inside a dedicated, least-privileged virtual environment rather than the global Python environment.
- Document the exact supported Python and dependency versions.
- Generate and retain a software bill of materials, and routinely scan pinned dependencies for known vulnerabilities.
- Replace both vulnerable commands with a controlled installation procedure, for example:
bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt- Ensure
requirements.txtcontains exact versions and verified hashes for all resolved artifacts.
- Pin
