Back to skill

Security audit

Cron Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it can broadly delete scheduled jobs and automatically recreate a watchdog job without tight scoping or confirmation.

Install only if you are comfortable giving this skill authority to alter the OpenClaw cron namespace. Review the deletion rules first, avoid running it under a highly privileged account, and prefer a version with dry-run output, explicit confirmation, owner/namespace checks, safe argument-array command execution, and documented watchdog behavior.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:88
Finding

Shell Command Injection Through Untrusted Cron Job Identifier

Content
View full analysis
" ``` 5. The shell interprets the embedded payload and executes it with the privileges of the Node.js process. ### Impact Assessment Successful exploitation permits arbitrary command execution with the operat ...[truncated 378 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
index.js:72
Finding

Unrestricted Deletion of Unrelated System-Wide Cron Jobs

Content
View full analysis
STALE_AGE_MS) { shouldRemove = true; } // Rule 2: Remove completed one-shot jobs ('at') that ran successfully if (job.schedule?.kind === 'at' && job.state?.lastStatus === 'ok' && age > STALE_AGE_MS) { shouldRemove = true; } // Rule 3: Remove "Mad Dog" spam jobs (evolver loops) if disabled if ((job.name?.includes('Mad Dog') || job.payload?.message?.includes('evolver/index.js')) && job.enabled === false) { shouldRemove = true; } if (shouldRemove) { try { console.log(`[CronOptimizer] Removing stale job: ${job.name} (ID: ${job.id}, Age: ${Math.floor(age/3600000)}h)`); execSync(`openclaw cron remove "${job.id}"`, { stdio: 'ignore' }); removedCount++; } catch (e) { console.error(`[CronOptimizer] Failed to remove job ${job.id}:`, e.message); } } ``` ### Technical Analysis The use of `cron list --all` expands the operation to the complete cron namespace available to the executing account. The deletion policy does not check whether a job was created by this skill, belongs to the evolver subsystem, or is explicitly authorized for cleanup. In particular, every disabled job older than 24 hours is considered removable. A disabled jo ...[truncated 1366 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
index.js:5
Finding

Unsafe Fixed-Path State Writes Permit Symlink-Based File Overwrite

Content
View full analysis
j.name === 'evolver_watchdog_robust') })); ``` ### Technical Analysis The skill writes to predictable paths without checking whether the path is a symbolic link, verifying file ownership, setting an explicit restrictive mode, or using a no-follow file-opening option. `fs.writeFileSync()` follows symbolic links by default and truncates the resolved target. If another local user or process can create or replace one of these predictable paths, it can redirect the optimizer’s write operation to another file writable by the optimizer process. The use of direct, non-atomic writes also allows partial state files if the process is interrupted during a write. ### Attack Path 1. An attacker with write access to the relevant `memory` directory removes or replaces a state or cache file. 2. The attacker creates a symbolic link at the predictable path pointing to another file. 3. The optimizer runs under an account that can write to the symlink target. 4. `fs.writeFileSync()` follows the link and truncates or overwrites the ...[truncated 704 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented purpose is limited to pruning stale or redundant cron entries, but the finding indicates additional persistence-oriented behavior: checking for a watchdog, recreating it by executing another script, and maintaining state files. That mismatch is dangerous because operators may approve or run the skill expecting cleanup only, while it can also restore scheduled execution paths and preserve persistence mechanisms not disclosed in the interface.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill’s stated purpose is cron cleanup, but it also provisions a separate watchdog job when absent. This hidden persistence behavior expands scope beyond maintenance and can re-establish scheduled execution without operator approval, which is dangerous in an agent skill because it can preserve or restore autonomous execution after cleanup attempts.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Invoking an unrelated lifecycle script from a cron cleanup tool creates an undeclared control path that can modify scheduler state outside the advertised function. This is risky because it chains trust to another script and recreates persistence automatically, making review and operator intent harder to verify.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises removal of cron jobs and stale scheduled tasks but provides no warning that it makes destructive system changes. In a system-management context, silent deletion of scheduled jobs can disable legitimate automation, monitoring, backups, or recovery tasks, especially if the cleanup criteria are imperfect or overly broad.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The docstring presents the skill as a cleanup-only utility, but the implementation also restores a missing watchdog job. This mismatch is security-relevant because it conceals persistence-affecting behavior from reviewers and users, reducing informed consent and increasing the chance the skill is deployed with misunderstood privileges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill automatically deletes cron jobs based on heuristic rules without confirmation, approval workflow, or dry-run mode. In a scheduler-management context, this can remove legitimate jobs, disrupt automation, and create availability issues if metadata is stale, incomplete, or attacker-influenced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

Recreating a watchdog job without prior warning or consent is an unauthorized state-changing action, even if intended for resilience. In this skill context it is more dangerous because it is bundled into a cleanup tool, so operators may run it expecting only deletions while it silently reintroduces scheduled execution.

Content

No source excerpt is available for this finding.