T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned Python and CLI Dependencies Create Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt:1-5`; installation guidance also appears in `README.md:14-24` and `SKILL.md:17-20` **Vulnerability Type**: Unconstrained third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```text httpx>=0.27.0 # Note: This skill also requires the inference.sh CLI to be installed separately. # Install with: npm install -g @inference.sh/cli # Visit https://inference.sh for more information. ``` The documented CLI installation is also unpinned: ```bash npm install -g @inference.sh/cli ``` ### Technical Analysis The Python dependency accepts any `httpx` version at or above `0.27.0`, while the external `@inference.sh/cli` package is installed globally without an exact version or integrity constraint. The repository contains no reviewed lockfile or package hashes. Both generation scripts subsequently execute `inference.sh` as a local program. Consequently, the effective code executed by the skill depends on whichever package version is available when installation occurs, rather than a version reviewed together with this project. This does not establish that the current upstream packages are malicious. It creates a supply-chain weakness under which an upstream compromise, malicious future release, package ownership transfer, or incompatible update could introduce unreviewed behavior. ### Attack Path 1. An attacker compromises an upstream package publication account or causes a malicious version to be published. 2. A user follows the documented installation instructions without specifying a version. 3. The package manager resolves and installs the attacker-controlled or otherwise unreviewed release. 4. The user invokes either video-generation script. 5. The scripts execute the globally resolved `inference.sh` binary with the privileges and inherited environment of the user. 6. The compromised dependency can access data and resources available to that process, including prompts ...[truncated 601 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin Python packages to reviewed exact versions, for example: ```text httpx==<reviewed-version> ``` 2. Generate and commit a lockfile containing cryptographic hashes, such as a hash-checked `requirements.txt` produced through `pip-tools`. 3. Pin the CLI to a reviewed exact version: ```bash npm install --global @inference.sh/cli@<reviewed-version> ``` 4. Prefer a project-local CLI installation over a global installation and invoke the known local binary explicitly. 5. Document the canonical package ecosystem and remove ambiguous alternative installation commands unless both packages are independently verified. 6. Use package-manager integrity controls, dependency scanning, and a controlled update process before changing pinned versions. 7. Run the external CLI in a sandbox with a minimal environment and only the filesystem/network access required for video generation. ]]>
