Back to skill

Security audit

Low-Spec Optimizer

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed low-resource cleanup helper, but its cleanup script can delete more local data than its purpose safely requires.

Install only if you are comfortable with a cleanup helper that can delete local session and cache data. Run the dry-run first, review every target path, avoid aggressive mode unless you intentionally want system journal and package-cache cleanup, and do not run it with elevated privileges until the deletion scope is narrowed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/cleanup_sessions.sh:38
Finding

Cleanup Logic Can Recursively Delete Active and Non-Stale Sessions

Content
View full analysis
/dev/null | wc -l) if [ "$stale_count" -gt 1 ]; then echo "Found $((stale_count - 1)) stale session(s)" if [ "$DRY_RUN" = true ]; then find /home/nvi/.openclaw/sessions -maxdepth 1 -type d -mmin +60 -exec echo "[DRY-RUN] Would remove: {}" \; else find /home/nvi/.openclaw/sessions -maxdepth 1 -type d -mmin +60 -exec rm -rf {} + 2>/dev/null || true echo "[CLEANED] Stale sessions removed" fi fi fi ``` ### Technical Analysis The `find` commands use `-maxdepth 1` but omit `-mindepth 1`. Consequently, the search may include `/home/nvi/.openclaw/sessions` itself when that root directory satisfies `-type d -mmin +60`. If both the session root and at least one child directory match, `stale_count` is greater than one and the deletion branch executes. Passing the root to `rm -rf` recursively removes everything under it, including child sessions that are newer than one hour or currently active. The count adjustment does not prevent deletion of the root; it only changes the displayed count. The code also suppresses errors with `2>/dev/null || true` and unconditionally reports that stale sessions were removed. This can conceal partial failures or unintended deletion behavior. ### Attack Path 1. `/home/nvi/.openclaw/sessions` has a modification time older than one hour. 2. At least one immediate child session directory also has a modification time older than one hour. 3. A user follows the documented instructions and runs `cleanup_sessions.sh` without `--dry-run`. 4. The count check succeeds because both the root and child dire ...[truncated 796 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cleanup_sessions.sh:60
Finding

Cleanup Removes the Entire Playwright Data Directory Instead of a Scoped Cache

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The code is consistent with one subset of the description: resource monitoring / health checking on low-spec machines. However, the declared purpose claims a broader optimization skill that includes automatic cleanup, session management, and configuration recommendations. None of those capabilities appear in this code chunk. The script is read-only and reports metrics; it does not optimize performance or take corrective actions. That makes the description materially broader than the actual behavior shown.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly authorizes proactive invocation during heartbeats and before heavy operations using broad conditions such as low-resource machines or general system lag. In an agent setting, ambiguous proactive triggers can cause the skill to run unexpectedly, leading to unnecessary system inspection, cleanup actions, or interference with user workflows on constrained hosts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

In aggressive mode, the script invokes journalctl --vacuum-time=3d, which deletes system journal logs outside the OpenClaw application scope. For a low-resource optimization skill, removing host-level forensic and operational logs is overbroad and can hinder incident response, troubleshooting, and auditability while providing only indirect memory or disk benefits.

Content

No source excerpt is available for this finding.