T08 · Insecure Dependencies
- Location
scripts/generate_image.py:2- Finding
Runtime Installation of an Unpinned Third-Party Dependency
- Content
View full analysis
Vulnerability Details
File Locations:
scripts/generate_image.py:2-6scripts/generate_image_v2.py:2-6scripts/generate_image_v3.py:2-6
Vulnerability Type: Supply-chain exposure through an open-ended dependency constraint
Risk Level: MediumVulnerable Code
The following dependency declaration is present in all three affected scripts:
python # /// script # requires-python = ">=3.10" # dependencies = [ # "requests>=2.31.0", # ] # ///Technical Analysis
The scripts use PEP 723 inline metadata interpreted by
uv run. The constraintrequests>=2.31.0does not identify a specific audited release and permits installation of any future version satisfying the minimum version.The documented execution workflow invokes the scripts through
uv run, which may resolve and install dependencies dynamically. The repository does not include an observed lockfile, artifact hashes, or another mechanism that guarantees installation of the exact dependency version reviewed by the Skill publisher.This does not demonstrate that the current
requestspackage is malicious. However, it creates a mutable supply-chain trust boundary: a future compromised package release, compromised package-index account, or manipulated dependency resolution source could introduce code that was not part of this audit.Imported Python package code executes inside the image-generation process. That process may have access to:
DASHSCOPE_API_KEYARK_API_KEYorVOLC_API_KEYDEEPSEEK_API_KEY~/.openclaw/openclaw.json- User image prompts and generated image URLs
- Files readable or writable by the invoking operating-system account
- Outbound network access
Attack Path
- An attacker compromises a future compatible
requestsrelease, its publication account, or a package source used byuv. - The malicious release retains a version number satisfying
requests>=2.31.0.
...[truncated 974 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the open-ended constraint with an exact, reviewed version:
python # dependencies = [ # "requests==2.32.5", # ] -
Use a committed lockfile where supported and require locked or frozen dependency resolution in documented execution commands.
-
Record and verify cryptographic hashes for approved distributions.
-
Configure
uvto use a trusted package index and prevent fallback to untrusted or unintended indexes. -
Add automated dependency review and vulnerability scanning before changing pinned versions.
-
Reproduce the same hardened declaration in all three scripts so legacy entry points cannot bypass the dependency policy.
-
