T08 · Insecure Dependencies
- Location
SKILL.md:53- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:53andscripts/imagegen.py:7,21
Vulnerability Type: Unpinned dependency installation
Risk Level: MediumVulnerable Code
SKILL.md:53:bash pip3 install requestsscripts/imagegen.py:7:python Dependency: requests (pip3 install requests)scripts/imagegen.py:19-22:python try: import requests except ImportError: print("Missing dependency: requests. Run pip3 install requests", file=sys.stderr) sys.exit(1)The messages in the Python source are translated here for clarity; the executable installation command is unchanged.
Technical Analysis
The documented installation procedure resolves
requestsand its transitive dependencies from the package index at installation time without a version constraint, lockfile, package hash, or trusted-index restriction. Consequently, the dependency graph that users receive can change after this Skill has been audited.Although
requestsis a legitimate package and the project does not contain evidence that it intentionally selects a malicious dependency, this installation pattern weakens supply-chain reproducibility. A compromised package release, package-index account, index mirror, or transitive dependency could introduce code that was not present during the audit. Python package installation and import-time initialization may execute code under the installing or invoking user's account.Attack Path
- A user follows the installation instruction and runs
pip3 install requests. pipqueries its configured package index or mirror and resolves the latest compatible package set.- An attacker who has compromised a relevant package release, maintainer account, dependency, or configured mirror supplies malicious package content.
- The malicious package is installed without a project-provided hash comparison detecting the substitution.
- Malici ...[truncated 773 chars]
- A user follows the installation instruction and runs
- Remediation
View remediation
Remediation Suggestions
-
Add a reviewed dependency file that pins exact versions, including relevant transitive dependencies.
-
Record cryptographic hashes and install with hash verification, for example:
bash python3 -m pip install --require-hashes -r requirements.txt -
Generate and review a lockfile through a dependency-management tool such as
pip-tools. -
Document an approved HTTPS package index and avoid untrusted mirrors.
-
Use an isolated virtual environment rather than installing into a shared or privileged Python environment.
-
Add automated dependency vulnerability and integrity scanning to the release process.
-
Replace the bare installation instruction in both the documentation and error message with the locked, hash-verified procedure.
-
