Back to skill

Security audit

Mlx Apple Silicon Mlx

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent local Apple Silicon AI setup guide, with disclosed local API use and ordinary package-installation risk rather than hidden or malicious behavior.

Install the Python tools in an isolated environment, avoid sudo, and consider pinning reviewed versions of ollama-herd, mflux, and diffusionkit. Treat prompts, audio files, and embeddings sent to the router as data available to your local fleet nodes.

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

Unpinned Third-Party Package Installation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-34
Vulnerability Type: Unpinned dependencies installed from public package registries
Risk Level: Medium

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

# Install image generation backends
uv tool install mflux           # Flux models (~7s at 512px)
uv tool install diffusionkit    # Stable Diffusion 3/3.5

Technical Analysis

The setup instructions install ollama-herd, mflux, and diffusionkit without version constraints, hashes, a lockfile, or an authenticated artifact-verification procedure. Consequently, the effective code installed by these commands can change after the Skill has been reviewed.

Installation from a public registry is necessary for the documented setup, but installing unconstrained latest releases is not the minimum-risk method. If a package, maintainer account, release pipeline, or transitive dependency is compromised, a user following these instructions could install attacker-controlled code. The subsequent execution of herd and herd-node would then run that code.

The static pre-scan warning concerning lines 112, 115, and 118 is not confirmed as remote payload execution. Those commands retrieve JSON from a loopback HTTP service and pipe it to python3 -m json.tool, which parses and formats data rather than executing it as shell code:

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

Attack Path

  1. An attacker compromises one of the named packages, its maintainer account, its release process, or a transitive dependency.
  2. The attacker publish ...[truncated 1403 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every direct dependency to a reviewed, immutable version, for example:
    bash
    python3 -m pip install "ollama-herd==<reviewed-version>"
    uv tool install "mflux==<reviewed-version>"
    uv tool install "diffusionkit==<reviewed-version>"
    
  2. Provide a lockfile or constraints file covering transitive dependencies, and regenerate it only through a controlled review process.
  3. Use hash verification where supported, such as pip install --require-hashes -r requirements.txt, with hashes sourced from a trusted release process.
  4. Publish verified package names, versions, checksums, and expected maintainers in the documentation to reduce dependency-confusion and package-substitution risk.
  5. Recommend installation in an isolated virtual environment or dedicated tool environment rather than into a global Python environment.
  6. Review package provenance, release signatures or attestations, and upstream changes before updating pinned versions.
  7. Avoid running installation or tool commands with sudo or an administrative account.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (4)

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

bash
# Fleet overview
curl -s http://localhost:11435/fleet/status | 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 115)May include surrounding context.

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

# Model recommendations based on your hardware
curl -s http://localhost:11435/dashboard/api/recommendations | python3 -m json.tool

# Health checks
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 118)May include surrounding context.

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

Health checks

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

text

Dashboard at `http://localhost:11435/dashboard` — see every node, every model, every queue in real time.

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

bash
# Flux via mflux (fastest)
curl -o flux.png http://localhost:11435/api/generate-image \
  -H "Content-Type: application/json" \
  -d '{"model": "z-image-turbo", "prompt": "a neural network visualization", "width": 1024, "height": 1024}'