Back to skill

Security audit

ModelDeck 本地模型工坊

Security checks for vulnerabilities and agentic risk

Overview

The scanners report unsafe defaults that could expose unauthenticated inference services to reachable networks, so ClawScan classifies this skill as suspicious; the analysis is partial because some local references were missing.

Consider the network exposure before installing: the reported deployment examples may make inference services reachable without authentication, allowing others on reachable networks to use resources or disrupt service. The scan is partial because some local references did not match bundled files, so its evidence does not cover everything those references may involve.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
.
Finding

Default deployment exposes unauthenticated inference services to the network

Content
View full analysis

Impact

Unauthorized model use and GPU/CPU resource consumption can delay or deny inference service to legitimate users. This finding does not establish access to other users' prompts or host code execution.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (15)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Do: prefer pre-quantized GGUF, always download with resume support, and run three checks after landing (byte size, SHA256, GGUF header).

bash
curl -L -C - --retry 5 --retry-delay 3 -o "$MODELDECK_HOME/models/model-Q4_K_M.gguf" "<MODEL_FILE_URL>"
python scripts/verify_download.py --file "$MODELDECK_HOME/models/model-Q4_K_M.gguf" --sha256 <SHA256> --size <BYTES>

Deployment instructions expose unauthenticated inference services on all network interfaces without warning users.

High
Category
Output Handling
Confidence
99% confidence
Finding

Both launch examples bind unauthenticated inference services to every IPv4 interface, allowing access from any network that can reach the ports. In a deployment skill intended for internal business use, this can enable unauthorized GPU consumption, denial of service, and access to exposed management endpoints; the later production-hardening section does not address this exposure.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

做什么:优先拿预量化 GGUF,下载必须支持断点续传,落盘后做三重校验(字节数、SHA256、GGUF 头)。

bash
curl -L -C - --retry 5 --retry-delay 3 -o "$MODELDECK_HOME/models/model-Q4_K_M.gguf" "<MODEL_FILE_URL>"
python scripts/verify_download.py --file "$MODELDECK_HOME/models/model-Q4_K_M.gguf" \
    --sha256 <EXPECTED_SHA256> --size <EXPECTED_BYTES>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

做什么:优先拿预量化 GGUF,下载必须支持断点续传,落盘后做三重校验(字节数、SHA256、GGUF 头)。

bash
curl -L -C - --retry 5 --retry-delay 3 -o "$MODELDECK_HOME/models/model-Q4_K_M.gguf" "<MODEL_FILE_URL>"
python scripts/verify_download.py --file "$MODELDECK_HOME/models/model-Q4_K_M.gguf" \
    --sha256 <EXPECTED_SHA256> --size <EXPECTED_BYTES>

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/serving-recipes.md (reported line 46)May include surrounding context.

Environment="OLLAMA_MODELS=/data/modeldeck/models"

Environment="OLLAMA_KV_CACHE_TYPE=q8_0"

Environment="OLLAMA_FLASH_ATTENTION=1"

sudo systemctl daemon-reload && sudo systemctl restart ollama systemctl show ollama -p Environment # 确认变量真的进了进程

text

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.en.md (reported line 98)May include surrounding context.

Do: prefer pre-quantized GGUF, always download with resume support, and run three checks after landing (byte size, SHA256, GGUF header).

bash
curl -L -C - --retry 5 --retry-delay 3 -o "$MODELDECK_HOME/models/model-Q4_K_M.gguf" "<MODEL_FILE_URL>"
python scripts/verify_download.py --file "$MODELDECK_HOME/models/model-Q4_K_M.gguf" --sha256 <SHA256> --size <BYTES>

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

做什么:优先拿预量化 GGUF,下载必须支持断点续传,落盘后做三重校验(字节数、SHA256、GGUF 头)。

bash
curl -L -C - --retry 5 --retry-delay 3 -o "$MODELDECK_HOME/models/model-Q4_K_M.gguf" "<MODEL_FILE_URL>"
python scripts/verify_download.py --file "$MODELDECK_HOME/models/model-Q4_K_M.gguf" \
    --sha256 <EXPECTED_SHA256> --size <EXPECTED_BYTES>

Deployment instructions expose unauthenticated inference services on all network interfaces without warning the user.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The Ollama and llama.cpp examples listen on all IPv4 interfaces without authentication or network access restrictions. Reachable clients could consume inference resources, disrupt legitimate workloads, or access exposed management functions, making these copy-paste deployment defaults unsafe even on an intranet.

Content

No source excerpt is available for this finding.

Internal Network Request

Medium
Category
Server-Side Request Forgery
Confidence
70% confidence
Finding

Code issues a request to a loopback, link-local, or private-range host. This can reach internal services not meant to be exposed and is a common SSRF pivot.

Content

Scanner excerpt · references/benchmarking.md (reported line 50)May include surrounding context.

md
"messages": [{"role": "user", "content": "<固定提示>"}]}

def one(_):
    req = urllib.request.Request("http://127.0.0.1:8080/v1/chat/completions",
                                 data=json.dumps(BODY).encode(),
                                 headers={"Content-Type": "application/json"})
    t0 = time.time()

Process-termination instructions omit a warning about interrupting active workloads and losing unsaved state.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The troubleshooting step instructs the agent to terminate processes by PID without warning that doing so can interrupt active inference or other GPU work and discard in-memory state. Two similar processes in nvidia-smi do not by themselves establish that either process is abandoned.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/serving-recipes.md (reported line 41)May include surrounding context.

Linux(systemd):

bash
sudo systemctl edit ollama
# [Service]
# Environment="OLLAMA_MODELS=/data/modeldeck/models"
# Environment="OLLAMA_KV_CACHE_TYPE=q8_0"

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/serving-recipes.md (reported line 46)May include surrounding context.

Environment="OLLAMA_MODELS=/data/modeldeck/models"

Environment="OLLAMA_KV_CACHE_TYPE=q8_0"

Environment="OLLAMA_FLASH_ATTENTION=1"

sudo systemctl daemon-reload && sudo systemctl restart ollama systemctl show ollama -p Environment # 确认变量真的进了进程

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/serving-recipes.md (reported line 46)May include surrounding context.

Environment="OLLAMA_MODELS=/data/modeldeck/models"

Environment="OLLAMA_KV_CACHE_TYPE=q8_0"

Environment="OLLAMA_FLASH_ATTENTION=1"

sudo systemctl daemon-reload && sudo systemctl restart ollama systemctl show ollama -p Environment # 确认变量真的进了进程

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/serving-recipes.md (reported line 62)May include surrounding context.

"%MODELDECK_HOME%\bin\ollama.exe" serve

text

macOS:用 `brew services start ollama` 托管,环境变量写进 launchd plist 的 `EnvironmentVariables`;`~/.zshrc` 只对交互终端生效,对后台服务无效。

## 二、llama.cpp 路线

The medium-VRAM deployment recipe exposes the inference server on all network interfaces without warning about remote access.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The medium-VRAM recipe exposes an unauthenticated inference server and metrics on every IPv4 interface, making resource abuse and denial of service possible from reachable networks. Other examples use loopback and the Ollama table mentions local-only binding, but neither protects users copying this standalone recipe.

Content

No source excerpt is available for this finding.