T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:31
- Finding
- Unpinned Third-Party Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 31 **Vulnerability Type**: Unpinned dependency installation from a mutable package registry **Risk Level**: Medium ### Vulnerable Code ```bash pip install ollama-herd ``` ### Technical Analysis The installation instruction retrieves `ollama-herd` from PyPI without specifying an audited version or verifying a cryptographic hash. Consequently, the package selected during installation may differ from the version reviewed when this Skill was published. Python packages can execute package-controlled build or installation logic. If the package's publisher account, release process, or distribution channel is compromised, a malicious release could execute code with the privileges of the user running `pip`. The referenced PyPI package and GitHub repository are consistent with the Skill's declared project. No evidence of current package compromise, dependency confusion, or deliberate malicious behavior was found in the audited file. The risk arises from trusting mutable, unverified third-party content. ### Attack Path 1. An attacker compromises the package publisher account, release pipeline, or another component of the package distribution channel. 2. The attacker publishes a malicious or backdoored release under the legitimate `ollama-herd` package name. 3. A user follows the Skill's unpinned `pip install ollama-herd` instruction. 4. `pip` downloads the attacker-controlled release and processes its package metadata, build backend, or installation content. 5. Malicious code executes with the installing user's privileges or is installed for later execution when `herd` or `herd-node` is invoked. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the account that performs the installation. The attacker could potentially access, modify, or delete files available to that account, read application configuration and credentials, make network requests, or alte ...[truncated 574 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specifically reviewed release: ```bash python3 -m pip install "ollama-herd==1.0.1" ``` 2. Distribute a requirements or lock file containing approved cryptographic hashes, and enforce verification: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Install the package in a dedicated virtual environment rather than the system Python environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 4. Review the selected release, its transitive dependencies, and its package provenance before updating the pinned version. 5. Avoid running installation commands with `sudo`, as root, or from another privileged account unless explicitly required and independently justified. 6. Consider documenting a trusted package index and using controls such as attestations, signed releases, or an internally mirrored and reviewed artifact repository. ]]>
