Back to skill

Security audit

Phi Phi4

Security checks for vulnerabilities and agentic risk

Overview

This documentation-only skill describes using a local Phi/Ollama Herd model fleet and is coherent, though users should be cautious about installing an unpinned external package and running a local service.

Install only if you trust the ollama-herd PyPI package and publisher, preferably in a virtual environment or with a pinned reviewed version. Expect it to start a local router, expose localhost APIs, and create or use fleet state/log files under ~/.fleet-manager; avoid sending sensitive prompts or audio unless you are comfortable with the local fleet setup.

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:27
Finding

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 27
Vulnerability Type: Unpinned dependency installation from a public package registry
Risk Level: Medium

Vulnerable Code

bash
pip install ollama-herd    # PyPI: https://pypi.org/project/ollama-herd/
herd                       # start the router (port 11435)
herd-node                  # run on each device — finds the router automatically

Technical Analysis

The installation instruction retrieves the latest available release of ollama-herd, along with its transitive dependencies, from PyPI without specifying an audited version, lockfile, or package hashes. The Skill package contains only documentation and does not include source code or integrity metadata for the component users are instructed to execute.

Consequently, the effective implementation can change after this Skill has been reviewed. A compromised upstream release, compromised transitive dependency, or maliciously modified future version could execute unintended code when the user starts herd or herd-node. This is a supply-chain weakness rather than evidence that the currently published package is malicious.

The separately flagged commands at lines 82–88 are not remote payload execution. They request JSON from a localhost service and pass it to Python's standard-library JSON formatter; they do not pipe content into a shell.

Attack Path

  1. An attacker compromises the ollama-herd publishing account, its build pipeline, or one of its unpinned transitive dependencies.
  2. The attacker publishes a malicious release to the package registry.
  3. A user follows the documented pip install ollama-herd instruction and receives the uncontrolled release.
  4. The user invokes herd or herd-node as instructed.
  5. Malicious package code executes with the operating-system privileges of that user and may access resources available to the process.

Successful exploitation depends ...[truncated 598 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin ollama-herd to a specific version that has been reviewed, for example ollama-herd==X.Y.Z.
  • Use a lockfile or constraints file that also fixes all transitive dependency versions.
  • Require package hashes, such as with pip install --require-hashes -r requirements.txt, to prevent substitution of unexpected artifacts.
  • Verify that the PyPI publisher corresponds to the linked upstream repository and document the expected package provenance.
  • Prefer installation in an isolated virtual environment with ordinary user privileges.
  • Periodically review dependency updates before changing the pinned version, including published artifacts, dependency changes, and upstream release signatures where available.
  • Consider documenting use of pipx or a dedicated virtual environment to limit dependency conflicts and reduce exposure to the user's broader Python environment.
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 (7)

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.

bash
# What's loaded and where
curl -s http://localhost:11435/api/ps | python3 -m json.tool

# Fleet health overview
curl -s http://localhost:11435/dashboard/api/health | 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.

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

# Fleet health overview
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool

# Model recommendations based on your hardware
curl -s http://localhost:11435/dashboard/api/recommendations | 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 88)May include surrounding context.

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

Model recommendations based on your hardware

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

text

Web dashboard at `http://localhost:11435/dashboard` — live view of nodes, queues, and performance.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The guardrail says files in ~/.fleet-manager/ should never be deleted or modified, yet the metadata declares active config, database, and log paths under that same directory. This inconsistency can mislead reviewers and agents about what state the skill reads or writes, undermining trust and safe handling of sensitive local data.

Content

No source excerpt is available for this finding.

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 52)May include surrounding context.

Phi-4-mini — fastest response times

bash
curl http://localhost:11435/api/chat -d '{
  "model": "phi4-mini",
  "messages": [{"role": "user", "content": "Summarize this in 3 bullet points: ..."}],
  "stream": false

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is marketed as a Phi-specific model skill, but it documents access to unrelated capabilities including image generation, speech-to-text, embeddings, dashboard APIs, and routing to larger models. This scope expansion increases the attack surface and may cause users or downstream agents to invoke higher-risk features they did not intend to enable.

Content

No source excerpt is available for this finding.

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 100)May include surrounding context.

Image generation

bash
curl http://localhost:11435/api/generate-image \
  -d '{"model": "z-image-turbo", "prompt": "minimalist circuit board art", "width": 512, "height": 512}'