T08 · Insecure Dependencies
Warning
- Location
- scripts/generate_video.py:3
- Finding
- Unpinned Runtime Dependencies Create Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `scripts/generate_video.py:3-7` **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```python # /// script # requires-python = ">=3.10" # dependencies = [ # "google-genai>=1.0.0", # "pillow>=10.0.0", # ] # /// ``` ### Technical Analysis The inline dependency declaration specifies only minimum versions. It does not provide exact versions, upper bounds, package hashes, or an accompanying lockfile. Consequently, the documented `uv run` workflow may resolve and install future releases that were not present during the Skill's security review. Python packages execute code in the same process and under the same operating-system identity as the Skill. A compromised package release, compromised package index, or unexpectedly incompatible future release could therefore access the Gemini API key, prompts, reference images, generated media, and files available to the invoking user. The declared `pillow` dependency does not appear to be imported by the script. Keeping an unused dependency unnecessarily expands the supply-chain and installation attack surface. This finding does not establish that the currently available packages are malicious. The issue is that future dependency resolution is mutable and is not reproducibly constrained to reviewed artifacts. ### Attack Path 1. An attacker compromises a future release of `google-genai` or `pillow`, the configured package repository, or an associated publishing account. 2. A user invokes the documented `uv run scripts/generate_video.py ...` command in an environment that has not already locked the dependencies. 3. The resolver selects and installs the compromised release because it satisfies the broad `>=` constraint. 4. Malicious package code executes with the privileges of the user running the Skill. 5. The dependency can read process data, including the Gemini API key and generation inputs, and access fi ...[truncated 633 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin reviewed dependencies to exact versions rather than using open-ended minimum constraints. 2. Commit a reproducible `uv.lock` or equivalent lockfile and require locked or frozen installation during execution. 3. Use package hashes or another integrity-verification mechanism where supported. 4. Configure resolution to use a trusted package index and prevent unintended fallback to untrusted repositories. 5. Remove `pillow` unless it is required by a documented execution path. 6. Establish an update process that reviews and tests dependency changes before modifying the lockfile. 7. Run the Skill in an isolated environment with access only to the API credential and files needed for the requested generation operation. ]]>
