T03 · Remote Payload Retrieval and Execution
- Location
references/local-providers.md:7- Finding
Unverified Remote Installer Is Piped Directly into a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly coherent, but its setup guide tells users to run unverified downloaded code, which deserves careful review before installing.
Install only after replacing the provider setup steps with verified package-manager or pinned checksum/signature flows. Treat any cloud routing decision as permission to send the prompt externally only after you explicitly approve it, especially for private or regulated data.
references/local-providers.md:7Unverified Remote Installer Is Piped Directly into a Shell
references/local-providers.md:58Downloaded llamafile Executable Is Run Without Integrity Verification
The supplied code is a narrow availability checker for local LLM providers. It queries localhost endpoints for Ollama, LM Studio, and llamafile, parses model metadata, and outputs availability plus a preferred local provider. That behavior is only a small supporting piece of the declared skill. The declared description promises a broader system that routes requests to local models first, falls back to cloud APIs when needed, and tracks savings in a persistent dashboard. None of those major capabilities appear in this code chunk. While the providers listed are consistent with the description, the actual primary purpose here is provider detection, not request routing or dashboard/cost tracking.
The declared description presents a full routing system with provider support, cloud fallback, and persistent savings/dashboard tracking. The supplied code only makes a heuristic routing decision and prints it as JSON. It does not send requests to any model, interface with Ollama/LM Studio/llamafile, contact cloud APIs, store metrics, or expose a dashboard. While the code is related to routing logic, it implements only a narrow decision component, so the description materially overstates the skill's actual behavior.
The declared description presents a broader skill whose primary purpose is request routing between local and cloud LLMs, with provider support and a dashboard. The supplied code chunk is only a bookkeeping utility for savings metrics persisted to ~/.openclaw/local-first-llm/savings.json. While the tracking portion partially aligns with the description, the core advertised behavior—routing requests to local models first, falling back to cloud APIs, and supporting specific local providers—is absent from this code. Therefore the description materially overstates the implemented capabilities.
The skill promotes cloud fallback but does not clearly warn that prompts may be sent to external APIs when local handling is unavailable or deemed unsuitable. In a privacy-focused routing skill, omission of that disclosure is especially dangerous because users may rely on the skill specifically to keep sensitive prompts local.
Piping a remotely fetched script directly into sh executes unverified code from the network without giving the user a chance to inspect or validate it. If the hosting site, connection path, or install script is compromised, this can lead to arbitrary code execution on the user's machine.
The | sh construct is dangerous because it turns downloaded content into immediate shell execution, collapsing download and execution into a single opaque step. In documentation aimed at setting up local LLM tooling, this increases the chance that users will run privileged or persistent code they have not reviewed.
The skill advertises and demonstrates shell execution, network access, and persistent file writes, but does not declare any tool scope such as permissions or allowed-tools. That creates an implicit capability surface where an agent may invoke sensitive operations without an explicit least-privilege contract, increasing the chance of unsafe or surprising behavior.
The activation text includes a broad trigger: 'any request where local-vs-cloud routing should be decided automatically.' Broad auto-activation can cause the skill to engage in contexts the user did not clearly request, which is risky here because the skill influences network routing, privacy decisions, and persistent logging.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
curl http://localhost:11434/api/generate \
-d '{"model": "llama3.2", "prompt": "YOUR_PROMPT", "stream": false}'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Test
curl http://localhost:11434/api/generate \
-d '{"model":"llama3.2","prompt":"Hello","stream":false}'
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
Each request is scored before routing. Higher = more complex = prefer cloud.
| Factor | Score Change |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Keyword match: `analyze`, `synthesize`, `compare`, `reason`, `architecture`, `code review`, `multi-step`, `evaluate`, `critique`, `refactor`, `design`, `implement`, `debug`, `strategy` | +2 per match |
| Keyword match: `summarize`, `translate`, `list`, `what is`, `define`, `explain briefly`, `convert`, `format`, `reformat`, `spell check` | −1 per match |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| Keyword match: `analyze`, `synthesize`, `compare`, `reason`, `architecture`, `code review`, `multi-step`, `evaluate`, `critique`, `refactor`, `design`, `implement`, `debug`, `strategy` | +2 per match |
| Keyword match: `summarize`, `translate`, `list`, `what is`, `define`, `explain briefly`, `convert`, `format`, `reformat`, `spell check` | −1 per match |
| Token count > 4,000 | +2 |
| Token count < 500 | −1 |
## Decision Tree
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| Keyword match: `analyze`, `synthesize`, `compare`, `reason`, `architecture`, `code review`, `multi-step`, `evaluate`, `critique`, `refactor`, `design`, `implement`, `debug`, `strategy` | +2 per match |
| Keyword match: `summarize`, `translate`, `list`, `what is`, `define`, `explain briefly`, `convert`, `format`, `reformat`, `spell check` | −1 per match |
| Token count > 4,000 | +2 |
| Token count < 500 | −1 |
## Decision Tree
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def run(args: list) -> dict:
try:
result = subprocess.run(
[PY] + args, capture_output=True, text=True, timeout=5
)
return json.loads(result.stdout) if result.returncode == 0 and result.stdout.strip() else {}
No suspicious patterns detected.