Back to skill

Security audit

Cron Management

Security checks for vulnerabilities and agentic risk

Overview

This cron-management skill is coherent, but it can broadly pause or resume scheduled jobs and uses unsafe shared /tmp files for maintenance mode.

Review before installing in any shared or production environment. Prefer exact job IDs or unique exact-name matching, require confirmation for all-jobs operations, and replace the /tmp maintenance files with an owner-controlled runtime directory with ownership and symlink checks.

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

Warning
Location
scripts/cronctl.sh:132
Finding

Predictable shared temporary files permit maintenance-state denial of service and symlink attacks

Content
View full analysis
/tmp/cron-paused success "Maintenance mode ENABLED — all jobs will skip on next run" ;; off) if [ -f /tmp/cron-paused ]; then rm /tmp/cron-paused success "Maintenance mode DISABLED — jobs will run normally" ``` The documented job integration also uses predictable shared paths: ```bash if [ -f /tmp/cron-paused ]; then echo "$(date -Iseconds) — $JOB_NAME skipped (maintenance mode)" >> /tmp/cron-skipped.log exit 0 fi ``` ### Technical Analysis The maintenance marker and skip log are stored directly under the globally writable `/tmp` directory using fixed names. The implementation does not create a private directory, verify file ownership, reject symbolic links, or enforce restrictive permissions. Any local user may create `/tmp/cron-paused` while it is absent. Integrated jobs only test whether this path exists, so they will treat an attacker-created file as an authorized maintenance request. On systems with the normal sticky bit on `/tmp`, the legitimate non-root service account may also be unable to remove a marker owned by another user, prolonging the denial of service. The redirection used to create the marker follows symbolic links where operating-system protections do not prevent it. The documented append operation for `/tmp/cron-skipped.log` has the same issue. If an attacker can pre-position a suitable symbolic link and the executing account can write to its target, the operation may overwrite or append to an attacker-selected file. Modern operating-system settings such as protected symlink and protected regular-file handling can reduce some cross-user exploitation paths, but the code must not rely on optional host-level mitigation. ...[truncated 1587 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cronctl.sh:40
Finding

Regex-based fuzzy job selection can modify an unintended cron job

Content
View full analysis
" local id id=$(get_job_id "$JOB_NAME") info "Pausing '$JOB_NAME' ($id)..." openclaw cron update "$id" '{"enabled": false}' success "Paused '$JOB_NAME'" } cmd_resume() { [ -z "$JOB_NAME" ] && die "Usage: cronctl resume " local id id=$(get_job_id "$JOB_NAME") info "Resuming '$JOB_NAME' ($id)..." openclaw cron update "$id" '{"enabled": true}' success "Resumed '$JOB_NAME'" } ``` ### Technical Analysis The supplied job name is passed directly to jq's `test()` function, which interprets it as a regular expression rather than as a literal job name. The code then pipes every matching identifier to `head -1`, silently choosing the first result. Consequently, a broad expression such as `.*`, a shared substring, or an otherwise ambiguous name can resolve to a different job than the operator intended. No uniqueness check or confirmation of the resolved canonical name is performed before `openclaw cron update` changes the job. Malformed regular expressions can also cause jq to fail. Because the script enables `set -euo pipefail`, such input can terminate the command, resulting in an availability or reliability failure rather than a controlled validation error. This is not shell command injection because ...[truncated 1469 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% 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 · scripts/cronctl.sh (reported line 138)May include surrounding context.

sh
;;
    off)
      if [ -f /tmp/cron-paused ]; then
        rm /tmp/cron-paused
        success "Maintenance mode DISABLED — jobs will run normally"
      else
        warn "Maintenance mode was not active"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file documents pause-all, resume-all, and maintenance mode commands that can stop or restart all cron jobs, affecting system behavior and potentially interrupting scheduled work. The description presents them as normal commands but does not include any warning or caution about service impact, which matches the markdown-file variant of missing user warnings.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The pause-all command disables every enabled cron job, which is a safety-critical operational change that can interrupt scheduled workloads. Although the function prints status messages, there is no confirmation step and the help text does not warn that this command affects all jobs at once.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The resume-all command re-enables every disabled cron job, which can cause broad system behavior changes by restarting scheduled execution across the fleet. The script logs progress, but it does not require user confirmation or provide a clear warning in the usage/help output about the scope of the action.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

Turning maintenance mode off deletes /tmp/cron-paused, a file write/delete operation that changes global scheduler behavior. The code prints success after the action, but the user-facing help does not clearly disclose that this command removes the maintenance marker and resumes normal job execution behavior.

Content

No source excerpt is available for this finding.