T08 · Insecure Dependencies
- Location
scripts/_tpvl_api.py:2- Finding
Unpinned Dependencies Are Automatically Resolved at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
scripts/_tpvl_api.py:2-9(also repeated in each executable script)
Vulnerability Type: Unpinned runtime dependencies
Risk Level: MediumVulnerable Code
python # /// script # requires-python = ">=3.11" # dependencies = [ # "requests", # "beautifulsoup4", # "lxml", # ] # ///The same unpinned dependency declarations are present in:
scripts/tpvl_games.py:2-9scripts/tpvl_schedule.py:2-9scripts/tpvl_standings.py:2-9scripts/tpvl_stats.py:2-9
SKILL.md:95-101explicitly states that these packages are automatically installed throughuv.Technical Analysis
All third-party packages are specified without exact versions or cryptographic hashes. Consequently, each environment may resolve and execute a different dependency version depending on the package index state and resolver behavior at installation time.
This creates a supply-chain exposure: compromise of a declared package, a malicious future release, or an incompatible release could introduce arbitrary code into the environment. Python packages can execute code during installation or whenever imported. In this project,
requestsis imported directly byscripts/_tpvl_api.py, so malicious package code would run with the privileges of the user invoking the skill.No evidence was found that the currently named packages are malicious. The vulnerability is the absence of reproducible, integrity-verified dependency resolution.
Attack Path
- An attacker compromises the account or release process of one of the declared packages, or otherwise influences the package source used by
uv. - The attacker publishes a malicious version that still satisfies the unconstrained dependency declaration.
- A user runs one of the scripts through
uv run. uvresolves and installs the attacker-controlled package version.- Malicious code executes during in ...[truncated 656 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to an audited exact version rather than using unconstrained names.
- Generate and commit a lock file containing resolved transitive versions.
- Require package hashes where supported so altered distributions are rejected.
- Configure
uvto use an explicitly trusted package index and avoid unreviewed fallback indexes. - Add automated dependency vulnerability and provenance scanning.
- Upgrade dependencies through a controlled review process rather than resolving the newest available release during ordinary skill execution.
- Remove unused dependencies. The reviewed implementation does not currently use
beautifulsoup4orlxml, so retaining them unnecessarily increases the supply-chain attack surface.
