T08 · Insecure Dependencies
- Location
fetch.py:2- Finding
Unpinned Runtime Dependencies Permit Supply-Chain Code Execution
- Content
View full analysis
=3.10" # dependencies = [ # "requests", # "python-dotenv" # ] # /// ``` `SKILL.md:23`: ```bash uv run fetch.py --url "https://example.com" ``` `README.md:40-43`: ```bash uv run fetch.py --url "https://example.com" ``` ### Technical Analysis The inline dependency declaration specifies `requests` and `python-dotenv` without exact versions or integrity hashes. The documented `uv run` command can therefore resolve and install whichever compatible package versions are available from the configured package index at execution time. Consequently, the repository does not fully determine the code that will execute. If a dependency release, transitive dependency, maintainer account, or configured package index is compromised, attacker-controlled code may be installed. Both declared packages are imported by `fetch.py`, so malicious module initialization code could execute within the invoking user's process. This is a supply-chain weakness rather than evidence that the currently named packages are malicious. ### Attack Path 1. An attacker compromises a declared dependency, one of its transitive dependencies, a package-maintainer account, or the package source used by the victim. 2. The attacker publishes or serves a malicious version that satisfies the unconstrained dependency declaration. 3. A user follows the documented command: ```bash uv run fetch.py --url "https://example.com" ``` 4. `uv` resolves and installs the attacker-controlled package because no reviewed version or integrity hash is enforced. 5. `fetch.py` imports the affected package: ```python import requests from dotenv import load_dotenv ``` 6. Mali ...[truncated 1012 chars]- Remediation
View remediation
