T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:18`; `scripts/generate_image.py:3-8` **Vulnerability Type**: Unpinned and unverifiable third-party dependencies **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:18`: ```yaml "command": "uv pip install google-genai pillow", ``` From `scripts/generate_image.py:3-8`: ```python # requires-python = ">=3.10" # dependencies = [ # "google-genai>=1.0.0", # "pillow>=10.0.0", # ] # /// ``` ### Technical Analysis The installation instruction does not specify any versions, while the inline Python dependency metadata only specifies minimum versions. The project also contains no reviewed lockfile or package hashes. Consequently, dependency resolution can select any future release satisfying these constraints. This does not prove that the current packages are malicious. However, it prevents reproducible installation and expands the trust boundary to include future package releases and the availability and integrity of the package registry at installation time. A compromised maintainer account, malicious future release, or registry compromise could introduce code that executes when imported or used by the script. ### Attack Path 1. An attacker compromises a dependency publisher account, package release process, or relevant package-registry infrastructure. 2. The attacker publishes a malicious version of `google-genai` or `pillow` that satisfies the unconstrained or minimum-version dependency declaration. 3. A user installs or runs the skill after that version becomes available. 4. `uv` resolves and installs the malicious release because no exact version, lockfile, or hash prevents selection. 5. Malicious package code executes with the privileges of the user running the skill, either during installation or when imported by `generate_image.py`. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the Agent user. This may expose the `GEMINI_API_K ...[truncated 304 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every runtime dependency to an audited exact version, for example: ```python # dependencies = [ # "google-genai==<reviewed-version>", # "pillow==<reviewed-version>", # ] ``` 2. Generate and commit a lockfile that records all transitive dependencies. 3. Require package hashes during installation so altered artifacts are rejected. 4. Make the installation command consume the reviewed lockfile rather than resolving the newest available releases. 5. Use automated dependency scanning and update packages only through a reviewed change process. 6. Where supported, use a trusted internal package mirror and provenance or signature verification. ]]>
