T08 · Insecure Dependencies
- Location
SKILL.md:325- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 325–327
Vulnerability Type: Supply-chain risk from unpinned package installation
Risk Level: MediumComplete Code Snippet:
markdown | sqlite3 | Database engine | Required | Bundled with the system or `pip install pysqlite3` | | LLM API | API | Required | Provided by the Agent platform's built-in LLM | | pypdf | Python library | Optional | `pip install pypdf` (PDF text extraction) |Technical Analysis
The Skill directs the Agent to install
pysqlite3andpypdfwithout fixed versions, cryptographic hashes, a lock file, or an explicitly trusted package index. Consequently, the installed artifacts depend on package-index state at execution time rather than on dependencies reviewed with this Skill.Python package installation may execute package-controlled build or installation logic. A compromised upstream release, dependency compromise, index redirection, or malicious package selected through an unsafe package source could therefore cause arbitrary code execution during installation. The audit found no evidence that the named packages are currently malicious; the confirmed issue is the unsafe, non-reproducible installation practice.
Attack Path
- A user requests SQLite support that is unavailable locally or requests PDF text extraction.
- The Agent follows the dependency instructions in
SKILL.md. - It runs
pip install pysqlite3orpip install pypdf. pipresolves the current package release and transitive dependencies from its configured index without enforcing reviewed versions or hashes.- If a resolved artifact or configured index is compromised, package-controlled code executes in the installation environment.
- The malicious code gains the same operating-system privileges and accessible resources as the Agent or user running
pip.
Impact Assessment
Successful exploitation could provide arbitrary code ...[truncated 575 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every package and transitive dependency to a reviewed version.
-
Require cryptographic hashes, such as with a hash-locked requirements file and
pip install --require-hashes. -
Use a lock file generated through a controlled dependency-review process.
-
Configure an explicit trusted package index rather than relying on ambient
pipconfiguration. -
Install dependencies in an isolated virtual environment under a non-privileged account.
-
Prefer Python's standard-library
sqlite3module when it satisfies the runtime requirements, avoidingpysqlite3. -
Scan pinned artifacts for known vulnerabilities and review dependency updates before adoption.
-
Document exact installation commands, for example:
bash python -m venv .venv . .venv/bin/activate python -m pip install --index-url https://pypi.org/simple \ --require-hashes -r requirements.lock
-
