Back to skill

Security audit

Distributed Inference

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local distributed-inference helper, but it documents model pull/delete and auto-pull actions that can change remote nodes without clearly documented access controls or confirmation mechanics.

Install only if you intend to run a local distributed-inference coordinator with node agents. Pin or verify the `ollama-herd` package, run it in an isolated environment as an unprivileged user, keep the dashboard/API bound to trusted interfaces, and require explicit approval before any model pull, delete, or auto-pull action.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 17
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

bash
pip install ollama-herd

Technical Analysis

The installation command resolves and installs the latest version of ollama-herd from the Python Package Index without a version constraint or integrity hash. Consequently, the code installed and later executed may differ from the version that existed when this Skill was reviewed.

Although the documented PyPI package and GitHub repository are consistent with the Skill's declared identity, the instruction does not protect users against a compromised publisher account, malicious future release, package-index compromise, or unexpected dependency changes. Python package installation may also execute package build logic, while the subsequent herd and herd-node commands execute installed package code.

This is not a confirmed malicious package, but it is a supply-chain weakness that creates a mutable code-execution boundary outside the audited artifact.

Attack Path

  1. An attacker compromises the package publisher account, distribution channel, or a transitive dependency.
  2. The attacker publishes a malicious release under the expected package name or introduces malicious dependency resolution behavior.
  3. A user follows the documented pip install ollama-herd instruction.
  4. pip resolves the attacker-controlled release because no audited version or hash is required.
  5. Malicious code executes during package installation or when the user starts herd or herd-node.

Impact Assessment

Exploitation could execute arbitrary code with the privileges of the user running pip, herd, or herd-node. This may expose files and credentials accessible to that user, alter local configuration, access network resources, tamper with inference traffic, or affect connected Ollama infrastructure. The instruction does not itself request ele ...[truncated 689 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to a reviewed release:
    bash
    python3 -m pip install "ollama-herd==1.0.4"
    
  2. Publish a lock file or requirements file containing cryptographic hashes and install with hash enforcement:
    bash
    python3 -m pip install --require-hashes -r requirements.txt
    
  3. Verify release artifacts through a trusted provenance mechanism, such as signed releases, attestations, or reproducible-build metadata.
  4. Pin and audit transitive dependencies rather than constraining only the top-level package.
  5. Recommend installation in an isolated virtual environment under an unprivileged account.
  6. Avoid sudo pip install and explicitly warn users not to run the coordinator or node agent with administrator or root privileges unless a separately documented requirement justifies it.
  7. Review and update the pinned version deliberately instead of allowing installation instructions to select future releases automatically.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 79)May include surrounding context.

Distributed Inference Coordinator State

bash
# distributed_inference_fleet_state — full distributed inference topology
curl -s http://localhost:11435/fleet/status | python3 -m json.tool

# distributed_inference_models — models across all distributed inference nodes
curl -s http://localhost:11435/api/tags | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 82)May include surrounding context.

md
curl -s http://localhost:11435/fleet/status | python3 -m json.tool

# distributed_inference_models — models across all distributed inference nodes
curl -s http://localhost:11435/api/tags | python3 -m json.tool

# distributed_inference_hot_models — models in GPU memory
curl -s http://localhost:11435/api/ps | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 85)May include surrounding context.

curl -s http://localhost:11435/api/tags | python3 -m json.tool

distributed_inference_hot_models — models in GPU memory

curl -s http://localhost:11435/api/ps | python3 -m json.tool

text

### Distributed Inference (OpenAI-compatible)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

Distributed Inference (OpenAI-compatible)

bash
# distributed_inference_chat — route via distributed inference scoring
curl -s http://localhost:11435/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"llama3.3:70b","messages":[{"role":"user","content":"Hello via distributed inference"}]}'

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 125)May include surrounding context.

Distributed Inference Health and Capacity

bash
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/usage | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 126)May include surrounding context.

Distributed Inference Health and Capacity

bash
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/usage | python3 -m json.tool

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 127)May include surrounding context.

bash
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool
curl -s http://localhost:11435/dashboard/api/usage | python3 -m json.tool

Distributed Inference Model Lifecycle

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 133)May include surrounding context.

Distributed Inference Model Lifecycle

bash
# distributed_inference_model_inventory
curl -s http://localhost:11435/dashboard/api/model-management | python3 -m json.tool

# Pull model to a distributed inference node
curl -s -X POST http://localhost:11435/dashboard/api/pull \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 91)May include surrounding context.

Distributed Inference (OpenAI-compatible)

bash
# distributed_inference_chat — route via distributed inference scoring
curl -s http://localhost:11435/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"llama3.3:70b","messages":[{"role":"user","content":"Hello via distributed inference"}]}'

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is presented as a coordination/routing layer, but it also documents administrative endpoints that can remotely pull or delete models on nodes. That expands the effective trust boundary from passive routing to remote state-changing operations, which can trigger large downloads, remove local assets, and alter node behavior if exposed or invoked without strong authorization and confirmation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation says pull/delete operations require user confirmation, but the API examples show direct POST requests with no described confirmation token, approval workflow, or other guard. This mismatch can cause operators or downstream agents to assume safety controls exist when the exposed interface appears to permit immediate remote changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This endpoint performs a state-changing remote action by instructing a node to pull a model, which may consume significant bandwidth, storage, and compute. In the absence of documented access controls or confirmation, it represents an administrative action exposed over HTTP that could be abused if reachable by an untrusted local process or network peer.

Content

Scanner excerpt · SKILL.md (reported line 136)May include surrounding context.

md
curl -s http://localhost:11435/dashboard/api/model-management | python3 -m json.tool

# Pull model to a distributed inference node
curl -s -X POST http://localhost:11435/dashboard/api/pull \
  -H "Content-Type: application/json" \
  -d '{"model": "llama3.3:70b", "node_id": "mac-studio"}'