T03 · Remote Payload Retrieval and Execution
- Location
references/local-providers.md:7- Finding
Unverified Remote Installation Script Is Piped Directly Into a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a local/cloud routing helper, but it can send sensitive prompts to cloud paths without clear consent and includes an unsafe remote installer command.
Review this skill before installing if you plan to use it for secrets, private business data, health data, or source code. Do not allow automatic cloud fallback for sensitive prompts unless you explicitly approve the destination provider, and avoid the documented curl-to-sh installer; use a verified package-manager or vendor install path instead.
references/local-providers.md:7Unverified Remote Installation Script Is Piped Directly Into a Shell
scripts/validate_result.py:64Sensitive Prompts Can Be Automatically Escalated to a Cloud Provider
scripts/validate_result.py:45Claimed Quality Gate Accepts Every Non-Empty Successful Response
The code only performs service discovery for three local providers by querying localhost endpoints and listing models. While this is related to the declared ecosystem of supported local providers, it does not implement the skill's main described behavior: routing requests, validating local output quality, escalating to cloud on failure, or tracking outcomes in a persistent dashboard. This is a material description-behavior mismatch because the supplied code chunk represents only a small supporting check, not the declared primary purpose.
The declared description centers on an adaptive execution pipeline: send requests to a local model first, inspect the returned answer, and only then escalate to cloud if quality is insufficient, while persistently tracking outcomes in a dashboard. The supplied code does something much narrower: it is a standalone command-line decision helper that chooses either local or cloud upfront using heuristic complexity and sensitivity checks. It never invokes a model, never inspects a response, and never performs retry/escalation after a failed local attempt. It also does not store metrics, update any dashboard, or report savings. While local/cloud routing is related to the declared theme, the core promised behaviors—quality validation, fallback based on actual output, persistent tracking, and provider support beyond a label—are absent, making this a material description/behavior mismatch.
The declared description presents a full adaptive-routing system for LLM inference, including local provider support, quality validation, fallback to cloud, and dashboard tracking. The supplied code chunk only implements the tracking portion: a command-line script that records outcome kinds, token counts, estimated cloud cost savings, and persists them to ~/.openclaw/adaptive-routing/savings.json. While this partially aligns with the tracking/dashboard aspect, the primary advertised capabilities—routing, validation, escalation logic, and provider support—are absent from this code. Therefore the description materially overstates what this code chunk actually does.
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
# Local success (no escalation needed)
python3 skills/adaptive-routing/scripts/track_savings.py log \
--kind local_success --tokens 800 --model gpt-4o
# Escalated (local failed validation, used cloud)
python3 skills/adaptive-routing/scripts/track_savings.py log \
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.
python3 skills/adaptive-routing/scripts/track_savings.py log
--kind escalated --tokens 800 --model gpt-4o
### 6. Show the dashboard
curl -fsSL https://ollama.ai/install.sh | sh fetches a remote script and immediately executes it without prior inspection, integrity verification, or pinning. If the host, network path, or downloaded script is compromised, users can suffer arbitrary code execution on their machine during installation.
The | sh pipeline is dangerous because it turns remotely fetched content directly into shell commands, eliminating the user's opportunity to review what will run. In a setup guide, this normalizes a risky pattern that can lead to immediate system compromise if the fetched content is malicious or tampered with.
The skill documentation instructs use of shell commands, network calls, and persistent file writes, yet it declares no explicit tool scope or permissions boundary. This creates a trust and review gap: an agent may execute capabilities broader than a user expects, including writing routing state under the home directory and sending prompts to local HTTP services.
The skill persists configuration and, elsewhere in the document, savings/outcome data under ~/.openclaw/adaptive-routing. Persistent storage can retain sensitive routing metadata, prompt-related statistics, and operational preferences across sessions, which may expose privacy-sensitive usage patterns on shared systems or through overly permissive file permissions.
Create ~/.openclaw/adaptive-routing/config.json to tune thresholds:
{
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. 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 > `token_high_watermark` (default 4,000) | +2 |
| Token count < `token_low_watermark` (default 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 > `token_high_watermark` (default 4,000) | +2 |
| Token count < `token_low_watermark` (default 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.