T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Third-Party Package Installation Creates a Supply-Chain Execution Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27-29
Vulnerability Type: Unpinned dependency installation from a mutable external package registry
Risk Level: MediumComplete Code Snippet:
bash pip install ollama-herd herd # start the load balancer on port 11435 herd-node # start load balancer backend node on each machineTechnical Analysis
The deployment instructions install
ollama-herdfrom PyPI without specifying an exact version or verifying an artifact hash. Consequently, the code installed by this command can change independently of the reviewed Skill document.Installing the load-balancer package is necessary for the declared functionality, but accepting an unconstrained current release is not necessary. If the package, its maintainer account, release process, or dependency chain is compromised, a subsequent installation could retrieve attacker-controlled content. Python package installation may invoke build-system behavior, while the subsequent
herdandherd-nodecommands directly execute console entry points supplied by the installed package.This is not a
curl | bashvulnerability. The flaggedcurlcommands elsewhere in the document retrieve JSON from localhost and pass it to Python JSON parsers; no remote shell script is piped into a shell. The confirmed concern is instead the mutable and unverified PyPI dependency.Attack Path
- An attacker compromises the
ollama-herdPyPI project, a maintainer account, its build or release pipeline, or a dependency selected during installation. - The attacker publishes a malicious release that remains compatible with the unrestricted package name.
- A user follows the Skill instructions and runs
pip install ollama-herd. pipresolves and installs the attacker-controlled release because no trusted version or hash is specified.- Malicious behavior may run during package build or installat ...[truncated 1011 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin the package to a reviewed, exact version, for example:
bash python3 -m pip install "ollama-herd==1.0.4" -
Prefer a locked requirements file containing cryptographic hashes, and install with hash enforcement:
bash python3 -m pip install --require-hashes -r requirements.lock -
Publish and document the expected SHA-256 hashes for all permitted wheels, including platform-specific artifacts where applicable.
-
Install the package inside 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.lock -
Avoid
sudo pip installand explicitly state that the service should run as a dedicated, non-privileged account with only the filesystem and network access required for load balancing. -
Review release provenance, package ownership, build metadata, and transitive dependencies before updating the pinned version. Where available, verify signed provenance or trusted-publisher metadata.
-
Separate installation from execution in the instructions and advise users to inspect the resolved package and dependency set before running
herdorherd-node.
-
