Back to skill

Security audit

Cron Limited

Security checks for vulnerabilities and agentic risk

Overview

The skill’s reminder purpose is coherent, but its shipped script has unsafe command-execution risks and creates persistent scheduled behavior that users should review before installing.

Install only after reviewing or fixing the script. The main risk is not hidden theft, but unsafe implementation: crafted reminder arguments can execute code as your user, and the skill creates persistent scheduled jobs plus local reminder records containing message and recipient data. Prefer a patched version that validates inputs, passes data to Python safely, avoids /tmp for the interpreter, and provides list/remove/purge controls for stored reminders and cron jobs.

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/cron-limited.sh:62
Finding

Arbitrary Python Code Execution Through Unsafely Interpolated Arguments

Content
View full analysis

Vulnerability Details

File Location: scripts/cron-limited.sh, lines 62-136
Vulnerability Type: Python source-code injection
Risk Level: High

Vulnerable Code

bash
get_next_lunar_date() {
  local month=$1
  local day=$2
  local year=${3:-""}
  
  /tmp/lunar-venv/bin/python3 -c "
from lunarcalendar import Lunar, Converter
import datetime

today = datetime.date.today()
if '$year':
    year = int('$year')
else:
    year = today.year

lunar = Lunar(year, $month, $day)
solar = Converter.Lunar2Solar(lunar)
print(f'{solar.year}-{solar.month:02d}-{solar.day:02d}')
"
}

calculate_reminder_date() {
  local solar_date="$1"
  local days_before=$2
  
  /tmp/lunar-venv/bin/python3 -c "
import datetime
date = datetime.date.fromisoformat('$solar_date')
reminder = date - datetime.timedelta(days=$days_before)
print(reminder.isoformat())
"
}

save_birthday_config() {
  local lunar_month="$1"
  local lunar_day="$2"
  local message="$3"
  local time="$4"
  local days_before="$5"
  local channel="$6"
  local to="$7"
  
  init_config
  
  /tmp/lunar-venv/bin/python3 << PYEOF
import json
with open('$CONFIG_FILE', 'r') as f:
    data = json.load(f)

for entry in data:
    if entry['lunar_month'] == $lunar_month and entry['lunar_day'] == $lunar_day:
        entry['message'] = '''$message'''.strip()
        entry['time'] = '$time'
        entry['days_before'] = $days_before
        entry['channel'] = '$channel'
        entry['to'] = '$to'
        with open('$CONFIG_FILE', 'w') as f:
            json.dump(data, f, ensure_ascii=False, indent=2)
        print('updated')
        exit(0)

new_entry = {
    'id': 'lunar_${lunar_month}_${lunar_day}',
    'lunar_month': $lunar_month,
    'lunar_day': $lunar_day,
    'message': '''$message'''.strip(),
    'time': '$time',
    'days_before': $days_before,
    'channel': '$channel',
 
...[truncated 2276 chars]
Remediation
View remediation

Remediation Suggestions

  • Do not construct Python source code using shell-variable interpolation.
  • Pass all data as ordinary values through positional arguments, environment variables, or JSON on standard input. For example:
    bash
    python3 - "$month" "$day" "$year" <<'PYEOF'
    import sys
    from lunarcalendar import Lunar, Converter
    
    month = int(sys.argv[1])
    day = int(sys.argv[2])
    year = int(sys.argv[3]) if sys.argv[3] else None
    # Continue using parsed values.
    PYEOF
    
  • Quote the heredoc delimiter (<<'PYEOF') to disable shell interpolation inside Python code.
  • Serialize birthday records as JSON and let Python parse the JSON as data rather than source code.
  • Validate all fields before use:
    • Lunar month and day must contain digits only and must be within supported calendar ranges.
    • days_before must be a non-negative integer within a reasonable upper bound.
    • Time must match a strict HH:MM format and represent a valid time.
    • Channel and destination values should be checked against expected formats.
  • Use atomic, permission-restricted writes for birthdays.json and fail safely on malformed configuration.
  • Add regression tests containing quotes, triple quotes, semicolons, newlines, Python comments, and expression-breaking payloads.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cron-limited.sh:62
Finding

Execution of a Predictable Interpreter Path Under the Shared Temporary Directory

Content
View full analysis

Vulnerability Details

File Location: scripts/cron-limited.sh, lines 62, 83, and 103
Vulnerability Type: Unsafe temporary-path executable trust
Risk Level: Medium

Vulnerable Code

bash
/tmp/lunar-venv/bin/python3 -c "
from lunarcalendar import Lunar, Converter
...
"
bash
/tmp/lunar-venv/bin/python3 -c "
import datetime
...
"
bash
/tmp/lunar-venv/bin/python3 << PYEOF
import json
...
PYEOF

Technical Analysis

The script executes an interpreter from the fixed path /tmp/lunar-venv/bin/python3. /tmp is a shared temporary namespace, and the script performs no ownership, permission, file-type, or integrity checks before trusting this executable.

Exploitability depends on local filesystem permissions and lifecycle management. If an attacker can pre-create /tmp/lunar-venv, replace its contents, or modify the referenced interpreter, the fixed path becomes a local binary-spoofing primitive. The script will execute the substituted file as though it were the expected Python interpreter.

This is particularly hazardous if the Skill is invoked by an account with more privileges than the account that prepared the temporary path, or if automated cleanup later makes the predictable name available for reuse.

Attack Path

  1. A local attacker obtains the ability to create or modify /tmp/lunar-venv/bin/python3, such as by pre-positioning the predictable directory before legitimate setup or exploiting permissive ownership on that directory.
  2. The attacker places an executable payload at the expected interpreter path.
  3. A user invokes an add-lunar operation.
  4. The script executes /tmp/lunar-venv/bin/python3 without validating it.
  5. The payload runs with the invoking user's privileges before or instead of the intended calendar operation.

Impact Assessment

If the path is attacker-controlled, exploitation results in arbitrary local code exe ...[truncated 429 chars]

Remediation
View remediation

Remediation Suggestions

  • Store the virtual environment in a private, persistent directory outside /tmp, such as a permission-restricted application data directory.
  • Create that directory with mode 0700 and ensure it is owned by the intended user.
  • Before execution, verify that the interpreter and every parent directory have the expected owner, are not symbolic links, and are not writable by group or other users.
  • Resolve the trusted interpreter during installation and store its path in protected configuration.
  • Where practical, invoke a trusted system Python executable and use a properly installed, pinned dependency environment.
  • If temporary storage is unavoidable, create it securely with mktemp -d, retain the unpredictable path, enforce restrictive permissions, and remove it after use. Do not reuse a globally predictable executable path.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill creates helper cron jobs containing sentinel or operational content unrelated to the user-visible reminder payload. Control-plane signaling through ordinary scheduled messages is dangerous because other agents, hooks, or future platform changes may process those strings as instructions, creating hidden automation pathways.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to read and persist local files (~/.openclaw/cron-limited/birthdays.json) but does not declare any tool scope or permissions. This creates a transparency and least-privilege failure: users and reviewers are not warned that the skill can access and store local data, increasing the risk of unintended file access or modification if the skill is invoked in a broader-capability environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill stores personal reminder data locally, including message content and recipient/channel identifiers, and also sends messages automatically on a schedule, but it does not warn users about either behavior. This is dangerous because users may unknowingly cause persistent storage of personal data and recurring outbound communications, creating privacy, consent, and misdelivery risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Hard-coding Shanghai timezone for all daily checks can cause reminders to fire on the wrong day or at the wrong time for users in other locales. In this skill's context, that can lead to privacy-impacting misfires or missed reminders, especially because the skill performs unattended automated message delivery.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill behavior exceeds its stated 'limited repeat cron' purpose by persisting long-term birthday state in a local file and creating a separate daily checker job. This hidden persistence and secondary scheduler broaden the trust boundary and create ongoing behavior the user may not expect, which is risky even if intended for functionality rather than abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script writes reminder configuration, including message text and recipient/channel fields, into a persistent user file without explicit user notice. This creates privacy and transparency risk because sensitive reminder content may remain on disk longer than expected and be processed later by helper jobs.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The limited-repeat implementation schedules a second cron task whose delivered message is an operational command string, openclaw cron rm <id>. If scheduled messages are ever interpreted by an agent or downstream automation, this becomes a control-plane action channel rather than a harmless reminder, enabling unintended job deletion behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill silently creates a follow-up scheduled task whose purpose is to delete another job, but the user is not explicitly warned that an additional destructive maintenance action will be scheduled. Hidden destructive side effects reduce auditability and can cause confusion or misuse if the mechanism is triggered unexpectedly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's natural-language comments and user-facing messages are in Chinese throughout, including errors and success output. There is no indication that the skill is region-specific or that users can opt into this locale, which can violate language-choice policy requirements.

Content

No source excerpt is available for this finding.