T08 · Insecure Dependencies
- Location
SKILL.md:91- Finding
Unpinned External Skill Installation Creates a Supply-Chain Risk
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a local cost-optimization skill whose scripts are purpose-aligned and do not perform network access, but users should review its optional provider-routing and agent-instruction changes before applying them.
Before installing, review the generated AGENTS.md.optimized and any HEARTBEAT.md changes manually, and do not blindly follow the optional unpinned companion-skill or GitHub clone instructions. The scripts appear local-only, but the skill is intended to influence model choice and agent context loading, so confirm the providers and model policies match your privacy and cost expectations.
SKILL.md:91Unpinned External Skill Installation Creates a Supply-Chain Risk
README.md:24Installation from a Mutable Git Default Branch Lacks Integrity Pinning
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).
grep -r "urllib|requests|http|socket|download|fetch" scripts/
grep -r "rm -rf|sudo|chmod 777|chown" .
### Review Imports
This mismatch specifically concerns the claimed route_by_tool_required() capability versus documented budget-tracking and state persistence behavior. When a prominently advertised security- or cost-sensitive function is absent or unclear while other persistent behaviors are present, users can be misled into trusting a capability that has not actually been implemented or reviewed, increasing the chance of unsafe deployment decisions.
This mismatch specifically concerns the claimed route_by_tool_required() capability versus documented budget-tracking and state persistence behavior. When a prominently advertised security- or cost-sensitive function is absent or unclear while other persistent behaviors are present, users can be misled into trusting a capability that has not actually been implemented or reviewed, increasing the chance of unsafe deployment decisions.
This mismatch specifically concerns the claimed route_by_tool_required() capability versus documented budget-tracking and state persistence behavior. When a prominently advertised security- or cost-sensitive function is absent or unclear while other persistent behaviors are present, users can be misled into trusting a capability that has not actually been implemented or reviewed, increasing the chance of unsafe deployment decisions.
This mismatch specifically concerns the claimed route_by_tool_required() capability versus documented budget-tracking and state persistence behavior. When a prominently advertised security- or cost-sensitive function is absent or unclear while other persistent behaviors are present, users can be misled into trusting a capability that has not actually been implemented or reviewed, increasing the chance of unsafe deployment decisions.
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
heartbeat_optimizer.py interval email 7200 # 2 hours
heartbeat_optimizer.py reset
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
# Update check interval (seconds)
heartbeat_optimizer.py interval email 7200 # 2 hours
# Reset state
heartbeat_optimizer.py reset
```
The skill metadata says it performs automatic model routing between providers, but this file instead targets OpenClaw workspace memory and AGENTS files under the user's home directory. That mismatch is dangerous because installing a seemingly harmless routing skill actually grants logic that rewrites local agent instructions and tracks workspace activity.
The skill manifest describes a token/model router that selects between paid Bailian models and free OpenRouter models based on whether a task requires tools, including a route_by_tool_required() function. This file instead implements heartbeat interval planning, quiet-hour suppression, cache-TTL recommendations, and local heartbeat state management, which is a materially different purpose.
The main exported routing path implements complexity-based multi-provider routing and CLI-driven provider override, while the stated skill purpose is tool-required vs chat-only routing between Bailian and OpenRouter free. In an agent setting, this mismatch can silently route prompts to unintended external providers, violating data-handling expectations and potentially sending sensitive user content to a provider the operator did not intend to use.
The manifest says this skill performs intelligent model routing based on whether tool use is required, specifically choosing between paid and free models. However, the README claims the skill also provides lazy context loading, heartbeat optimization, budget tracking, session pruning, bootstrap size limits, and cache TTL alignment, which materially expands the stated behavior beyond routing.
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.
Three native config patches that work today with zero external dependencies:
Auto-trim old tool results when the Anthropic cache TTL expires — reduces cache re-write costs.
{ "agents": { "defaults": { "contextPruning": { "mode": "cache-ttl", "ttl": "5m" } } } }
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.
- ✅ No network requests
- ✅ No code execution (no eval, exec, compile)
- ✅ Only standard library imports: `json, re, pathlib, datetime`
- ✅ Read/write permissions limited to OpenClaw workspace
- ✅ No subprocess calls
- ✅ No system modifications
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
grep -r "urllib|requests|http|socket|download|fetch" scripts/
grep -r "rm -rf|sudo|chmod 777|chown" .
### Review Imports
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.
## Threat Model
**What this skill CAN do:**
- Read/write JSON files in OpenClaw workspace
- Analyze text for complexity classification
- Generate markdown templates
- Provide recommendations via stdout
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
- Provide recommendations via stdout
**What this skill CANNOT do:**
- Execute arbitrary code
- Make network requests
- Modify system files outside workspace
- Access sensitive data
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
**What this skill CANNOT do:**
- Execute arbitrary code
- Make network requests
- Modify system files outside workspace
- Access sensitive data
- Run system commands
- Spawn subprocesses
The skill advertises script and integration capabilities that imply file access, state persistence, external-provider interaction, and possible environment use, but it declares no explicit tool scope such as allowed-tools or permissions. That omission weakens least-privilege boundaries and makes it harder for operators to review what the skill is actually allowed to touch, especially because the document encourages modifying workspace files and interacting with provider configuration.
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.
→ Savings: ~80% of context
# Standard work → selective loading
context_optimizer.py recommend "write a function"
→ Load: SOUL.md, IDENTITY.md, memory/TODAY.md
→ Skip: docs, old memory, knowledge base
→ Savings: ~50% of context
The file is primarily written in English, but the section beginning at L655 switches to Chinese instructional content and examples. This imposes a specific language for part of the skill documentation without opt-in or a stated region/language constraint, which matches the language/locale policy violation criteria.
The script persistently stores file access history and timestamps in a workspace memory file without notice, consent, retention limits, or access controls. Usage telemetry can reveal sensitive working patterns, file names, and behavior over time, creating a privacy and local-information disclosure risk.
The generated AGENTS.md describes standard work requests narrowly: load SOUL.md, IDENTITY.md, memory/TODAY.md, and conditionally TOOLS.md. In reality, the standard-context implementation iterates over all CONDITIONAL_FILES and may auto-include AGENTS.md, USER.md, TOOLS.md, MEMORY.md, or HEARTBEAT.md based on trigger words, so the documentation understates and misstates what the code recommends.
In recommend_context_bundle(), the 'full' context path unconditionally adds both today's and yesterday's memory logs. However, the generated documentation says 'Don't load YESTERDAY unless explicitly needed,' which directly contradicts the implemented recommendation logic for full-context tasks.
The script is presented as a context optimizer, but it generates AGENTS.md content that also dictates model-selection policy and operational behavior. This hidden expansion of scope can alter downstream agent behavior in ways users and reviewers would not expect, undermining transparency and policy control.
The generated instructions hard-code model choices such as 'HAIKU ONLY' and 'SONNET/OPUS' policies without user opt-in. In an agent environment, silently enforcing provider/model policy can override user preferences, cost controls, privacy expectations, or safety constraints, especially when injected into AGENTS.md-style control files.