T08 · Insecure Dependencies
- Location
SKILL.md:186- Finding
Unpinned Dependencies and Incorrect Installation of the Python sqlite3 Standard-Library Module
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 186-190
Vulnerability Type: Supply-chain exposure through unpinned dependencies and package-name confusion
Risk Level: MediumVulnerable Code
bash pip install requests pip install sqlite3 pip install pandas pip install akshare # Chinese stock data libraryTechnical Analysis
The installation instructions retrieve third-party packages without version constraints, integrity hashes, or a lock file. Consequently, the code installed by users can change independently of the reviewed Skill package.
The instructions also tell users to run
pip install sqlite3. Python already providessqlite3as a standard-library module, so it should not be installed from a package registry. Resolving a separately published package with the same name creates a package-confusion risk: users may install unrelated or malicious registry content under the mistaken belief that it is the standard Python module.Python packages may execute build or installation logic during installation. A compromised dependency release, malicious same-named package, or compromised configured package index could therefore execute code before the Skill itself runs.
No evidence was found that the project intentionally publishes or controls a malicious dependency. This finding concerns the unsafe dependency-installation procedure.
Attack Path
- A user follows the installation commands in
SKILL.md. pipresolves packages from PyPI or another package index configured in the user environment.- Because no exact versions or hashes are specified,
pipaccepts whichever compatible releases the index currently serves. - For
sqlite3, the resolver may retrieve a third-party distribution rather than use Python’s built-in module. - A malicious or compromised distribution executes installation hooks or malicious runtime code.
- That code runs with the privileges of the user performing the installation.
Impa
...[truncated 632 chars]
- A user follows the installation commands in
- Remediation
View remediation
Remediation Suggestions
- Remove the invalid registry installation instruction:
bash # Do not run: pip install sqlite3Use Python’s standard-library
sqlite3module and document that a Python build with SQLite support is required.- Create a reviewed dependency manifest containing exact versions:
text requests==REVIEWED_VERSION pandas==REVIEWED_VERSION akshare==REVIEWED_VERSION- Generate and verify cryptographic hashes for every direct and transitive dependency, then require them during installation:
bash python -m pip install --require-hashes -r requirements.txt-
Commit a lock file produced by a dependency-locking tool and update it only through a documented review process.
-
Recommend installation inside an isolated virtual environment rather than a global or administrative Python environment:
bash python -m venv .venv .venv\Scripts\python -m pip install --require-hashes -r requirements.txt-
Document the trusted package index explicitly and discourage unreviewed mirrors or extra package indexes.
-
Add automated dependency scanning and periodic review for known vulnerabilities, unexpected ownership changes, and compromised releases.
