T06 · System Persistence
Warning
- Location
- SKILL.md:117
- Finding
- Optional Cron Configuration Creates Persistent Scheduled Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 117-124 **Vulnerability Type**: Persistent scheduled task **Risk Level**: Medium ### Vulnerable Code ```markdown ## Daily Cron (optional) Add to crontab to auto-send report every morning: ```cron # Skill analytics report — 7:25 AM Israel (before morning briefing) 25 5 * * * /opt/ocana/openclaw/workspace/scripts/skill-report.sh ``` ``` ### Technical Analysis The Skill recommends adding a cron entry that executes `/opt/ocana/openclaw/workspace/scripts/skill-report.sh` every day. Although explicitly described as optional, installing this entry creates execution that persists across Skill runs and user sessions. Scheduled execution is not required for the Skill's core on-demand reporting functionality and therefore exceeds the minimum privileges needed for that functionality. In addition, the referenced `skill-report.sh` file is not included in the reviewed project, so its contents and security properties cannot be verified. The statement that the task will “auto-send” the report is also unsupported by the report-generation code shown elsewhere in the document, which only prints output. The severity depends on the permissions protecting the crontab and referenced script. If an untrusted user or process can create or replace that script, cron becomes a recurring execution mechanism for attacker-controlled code. ### Attack Path 1. A user follows the documentation and installs the supplied cron entry. 2. The cron entry remains active after the original Skill invocation ends. 3. An attacker or compromised local component gains write access to `/opt/ocana/openclaw/workspace/scripts/skill-report.sh` or a parent directory. 4. The attacker creates or replaces the script with arbitrary commands. 5. At 05:25 UTC, cron executes those commands with the permissions of the account owning the crontab. 6. Execution repeats daily until the cron entry is removed. ### Impact Assessment Successful exp ...[truncated 514 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove the cron recommendation unless automatic reporting is explicitly requested by the user. - Require informed, explicit opt-in before creating any scheduled task. - Include the exact `skill-report.sh` implementation in the reviewed package so its behavior can be audited. - Do not describe the task as “auto-send” unless a documented and authorized delivery destination is configured. - Run the scheduled report under a dedicated least-privileged account. - Store the script in a directory that is not writable by untrusted users or processes. - Set restrictive ownership and permissions, such as owner-only write access. - Prefer a scheduler configuration that applies filesystem, network, and resource restrictions. - Provide documented commands for inspecting and removing the scheduled task. ]]>
