T06 · System Persistence
Error
- Location
- references/cron-setup.md:25
- Finding
- Optional recurring audit registers persistent Agent execution with an external notification path<![CDATA[ ## Vulnerability Details **File Location**: `references/cron-setup.md:25-39` **Vulnerability Type**: Persistent scheduled task registration **Risk Level**: High ### Vulnerable Code ```bash openclaw cron add \ --name "changeway-security-audit" \ --description "Nightly security audit" \ --cron "45 23 * * *" \ --tz "Asia/Shanghai" \ --session "isolated" \ --message "Run the security audit script: node <skill-path>/scripts/openclaw-hybrid-audit-changeway.js — then from the output extract and report ONLY these three items: (1) the line containing PASS/FAIL/SKIP counts, (2) the report file path from the line starting with 'Detailed audit report saved to'. Do NOT include the full script output." \ --announce \ --channel <channel> \ --to <your-chat-id> \ --timeout-seconds 900 \ --thinking off ``` Related instructions also appear in `SKILL.md:116-130` and `SKILL.md:348-372`. ### Technical Analysis The first-run workflow encourages users to register an `openclaw cron` job that survives the current interaction and repeatedly starts an isolated Agent session. Each invocation executes a script that examines system configuration, logs, network listeners, processes, workspace content, Agent memory, and installed Skills. Scheduling is optional and the documentation prohibits adding `--push`, which reduces the telemetry risk. Nevertheless, recurring execution is not required for the declared one-time audit capability and materially expands the duration and frequency of access. The supplied command also enables `--announce`, `--channel`, and `--to`, creating a recurring external messaging path. Although `SKILL.md` later explains this behavior, the quick configuration template enables notifications directly. No conventional operating-system crontab is modified. Persistence is implemented through OpenClaw's own scheduler. ### Attack Path 1. The user invokes the Skill for an initial security audit. 2. The first-run workflow recommends automat ...[truncated 1139 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove scheduled-task enrollment from the first-run audit flow. 2. Present scheduling as a separate, advanced feature after a successful manual scan. 3. Display the fully resolved command, absolute script path, schedule, permissions, and notification destination before registration. 4. Require a separate confirmation immediately before executing `openclaw cron add`. 5. Disable `--announce`, `--channel`, and `--to` by default; require separate consent for external notifications. 6. Pin or verify the script hash before every scheduled execution so later file replacement cannot silently change task behavior. 7. Restrict the scheduled profile to a reduced set of non-invasive checks. 8. Document and offer a one-command removal procedure using `openclaw cron remove --id <job-id>`. 9. Add an expiration date or maximum-run count unless the user explicitly requests indefinite scheduling. 10. Continue enforcing the existing prohibition against `--push` in recurring jobs. ]]>
