Back to skill

Security audit

智图云仓 Token 路由

Security checks for vulnerabilities and agentic risk

Overview

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.

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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:91
Finding

Unpinned External Skill Installation Creates a Supply-Chain Risk

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
README.md:24
Finding

Installation from a Mutable Git Default Branch Lacks Integrity Pinning

Content
View full analysis
Remediation
View remediation
`. 3. Publish a checksum manifest or signed release and require verification before the directory is registered with OpenClaw. 4. Use signed Git tags or release attestations and document how users should verify them. 5. Warn users that cloning the mutable default branch installs unaudited current content. 6. Require a fresh security review before updating the pinned revision. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (34)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · SECURITY.md (reported line 202)May include surrounding context.

grep -r "urllib|requests|http|socket|download|fetch" scripts/

Search for system modifications (should return nothing)

grep -r "rm -rf|sudo|chmod 777|chown" .

text

### Review Imports

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

Update check interval (seconds)

heartbeat_optimizer.py interval email 7200 # 2 hours

Reset state

heartbeat_optimizer.py reset

text

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/heartbeat_optimizer.py (reported line 287)May include surrounding context.

python
# Update check interval (seconds)
heartbeat_optimizer.py interval email 7200  # 2 hours

# Reset state
heartbeat_optimizer.py reset
```

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · README.md (reported line 49)May include surrounding context.

Three native config patches that work today with zero external dependencies:

Session Pruning

Auto-trim old tool results when the Anthropic cache TTL expires — reduces cache re-write costs.

json
{ "agents": { "defaults": { "contextPruning": { "mode": "cache-ttl", "ttl": "5m" } } } }

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · SECURITY.md (reported line 92)May include surrounding context.

md
- ✅ 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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

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

Content

Scanner excerpt · SECURITY.md (reported line 202)May include surrounding context.

grep -r "urllib|requests|http|socket|download|fetch" scripts/

Search for system modifications (should return nothing)

grep -r "rm -rf|sudo|chmod 777|chown" .

text

### Review Imports

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · SECURITY.md (reported line 244)May include surrounding context.

md
## 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

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

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.

Content

Scanner excerpt · SECURITY.md (reported line 250)May include surrounding context.

md
- Provide recommendations via stdout

**What this skill CANNOT do:**
- Execute arbitrary code
- Make network requests
- Modify system files outside workspace
- Access sensitive data

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · SECURITY.md (reported line 252)May include surrounding context.

md
**What this skill CANNOT do:**
- Execute arbitrary code
- Make network requests
- Modify system files outside workspace
- Access sensitive data
- Run system commands
- Spawn subprocesses

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% 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 · SKILL.md (reported line 128)May include surrounding context.

md
→ 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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.