T08 · Insecure Dependencies
- Location
SKILL.md:45- Finding
Unnecessary Installation of Standard-Library-Named Packages Creates Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:45
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
bash pip install shutil pathlib glob2Technical Analysis
The skill instructs users or an executing agent to install
shutil,pathlib, andglob2from the Python Package Index. However,shutilandpathlibare already part of Python's standard library and do not require installation. The examples also import the standard-libraryglobmodule rather thanglob2.Installing packages whose names overlap with standard-library modules unnecessarily introduces a dependency-confusion and package-impersonation risk. Packages obtained through
pipmay execute package-controlled build or installation logic and subsequently run code when imported. The project does not pin versions, verify hashes, constrain an index, or otherwise authenticate the packages.No evidence establishes that the named packages are currently malicious. The vulnerability is the unnecessary and unverified third-party installation instruction, which exposes users to avoidable supply-chain risk.
Attack Path
- A user or agent follows the documented installation instructions.
pipresolves the standard-library-named packages from a configured public or private package index.- An attacker-controlled, compromised, or impersonating package is selected because no version or hash is pinned.
- Package-controlled code executes during installation, building, or a later import.
- The code runs with the privileges of the user or agent that invoked
pip.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the installing process. Depending on those privileges, this may permit access to user files, environment variables, credentials available to the process, and other local resources. If installation is performed from an ele ...[truncated 64 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
pip install shutil pathlib glob2instruction. - Use Python's built-in
os,shutil,pathlib, andglobmodules without installing external packages. - Update the metadata to state that only a compatible Python runtime is required.
- If a genuine third-party dependency is introduced later, pin an exact reviewed version and verify package hashes with a lock file or
--require-hashes. - Use a trusted package index and review package ownership, source code, and release history before publication.
- Run dependency installation in a restricted virtual environment without administrator privileges.
- Remove the
