Back to skill

Security audit

Llama Llama3

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent guide for running Llama models through a local Ollama fleet, with ordinary installation and local API examples but some supply-chain caution around an unpinned PyPI package.

Install only if you intend to run `ollama-herd` as a local fleet router. Prefer a virtual environment, avoid root or administrator shells, consider pinning or reviewing the package version, and do not send sensitive prompts or audio files unless you trust every device in the fleet and its local logs.

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:29
Finding
Unpinned Third-Party Package Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 29 **Vulnerability Type**: Unpinned package dependency and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```bash pip install ollama-herd # PyPI: https://pypi.org/project/ollama-herd/ ``` ### Technical Analysis The installation instruction retrieves the current package release associated with `ollama-herd` from PyPI without specifying an exact version or validating an integrity hash. Python package installation can execute package-controlled build or installation logic with the privileges of the invoking user. The project does not include a dependency lockfile, constraints file, package hashes, vendored source, or other mechanism that binds installation to a reviewed artifact. Consequently, the effective code installed by this instruction can change after this Skill has been audited. This does not establish that the named package is malicious. The vulnerability is the absence of dependency pinning and integrity verification, which exposes users to package-repository compromise, publisher-account compromise, malicious future releases, or an unintended incompatible release. ### Attack Path 1. An attacker compromises the package publisher account, package repository, release workflow, or another component capable of publishing a new `ollama-herd` release. 2. The attacker publishes a release containing malicious build, installation, or runtime code. 3. A user follows the documented `pip install ollama-herd` instruction after the malicious release becomes the version selected by pip. 4. Pip downloads the mutable release without checking it against a project-supplied version and hash. 5. Package-controlled code executes during installation or when the installed `herd` or `herd-node` command is subsequently launched. 6. The payload operates with the permissions of the user who performed the installation or launched the package. ### Impact Assessment Successful exploi ...[truncated 1038 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specifically reviewed version: ```bash python3 -m pip install "ollama-herd==<reviewed-version>" ``` 2. Publish a requirements or constraints file containing cryptographic hashes and require hash validation: ```text ollama-herd==<reviewed-version> \ --hash=sha256:<verified-distribution-hash> ``` Install it with: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. Verify and update the pinned version through a controlled dependency-review process rather than automatically selecting the latest release. 4. Recommend installation in a dedicated virtual environment under a non-privileged account: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Explicitly warn users not to run pip or the package commands with administrator or root privileges. 6. Where practical, document the expected package publisher, source repository, release provenance, and artifact digest so users can independently validate the dependency. ]]>
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 (6)

External Script Fetching

High
Category
Supply Chain
Content
```bash
# Models loaded in memory right now
curl -s http://localhost:11435/api/ps | python3 -m json.tool

# All models available across the fleet
curl -s http://localhost:11435/api/tags | python3 -m json.tool
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s http://localhost:11435/api/ps | python3 -m json.tool

# All models available across the fleet
curl -s http://localhost:11435/api/tags | python3 -m json.tool
```

## Monitor Llama performance
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
```bash
# Recent request traces — see latency, tokens, which node handled each request
curl -s "http://localhost:11435/dashboard/api/traces?limit=10" | python3 -m json.tool

# Fleet health — 15 automated checks
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
curl -s "http://localhost:11435/dashboard/api/traces?limit=10" | python3 -m json.tool

# Fleet health — 15 automated checks
curl -s http://localhost:11435/dashboard/api/health | python3 -m json.tool
```

Web dashboard at `http://localhost:11435/dashboard` — live view of all nodes, queues, and models.
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Transmission

Medium
Category
Data Exfiltration
Content
print(chunk.choices[0].delta.content or "", end="")
```

### curl (Ollama format)

```bash
curl http://localhost:11435/api/chat -d '{
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
### Image generation

```bash
curl http://localhost:11435/api/generate-image \
  -d '{"model": "z-image-turbo", "prompt": "a llama in the mountains", "width": 512, "height": 512}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.