T06 · System Persistence
Error
- Location
- SKILL.md:232
- Finding
- System-Level Persistence Through Automatically Registered Cron Jobs<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:232-247`, `openclaw.plugin.json:48-50`, `examples/vm-cloud-init.yaml:47-54`, `SECURITY.md:38-49` **Vulnerability Type**: Persistent scheduled execution outside the declared filesystem scope **Risk Level**: Critical ### Vulnerable Code `SKILL.md:232-247`: ```text ## Cron Schedule (for VM deployments) Set up these cron jobs for automated lifecycle management: # Daily summarization at 23:00 0 23 * * * openclaw skill run vm-memory-oracle --action summarize # Full consolidation at 00:30 30 0 * * * openclaw skill run vm-memory-oracle --action consolidate # Health check every 6 hours 0 */6 * * * openclaw skill run vm-memory-oracle --action health-check # Quality probe every Sunday at 03:00 0 3 * * 0 openclaw skill run vm-memory-oracle --action quality-probe ``` `openclaw.plugin.json:48-50`: ```json "install-cron": { "description": "Register cron jobs for automated memory lifecycle management" } ``` `examples/vm-cloud-init.yaml:47-54`: ```yaml # Create log directory - mkdir -p /var/log/openclaw # Install the skill (adjust to your installation method) - openclaw skill install vm-memory-oracle # Set up automated cron jobs - openclaw skill run vm-memory-oracle --action install-cron ``` `SECURITY.md:38-49` confirms the affected system paths: ```text ## Filesystem Scope All file operations are confined to: | Path | Operations | Purpose | |---|---|---| | `{data_path}/` | Read, Write, Create | Memory data storage | | `{data_path}/backups/` | Write, Delete | Pre-maintenance backups (7-day retention) | | `/etc/cron.d/openclaw-vm-memory-oracle` | Write | Cron job registration | | `/var/log/openclaw/` | Write | Log output from cron jobs | No other paths are accessed. ``` ### Technical Analysis The Skill defines an `install-cron` action that writes a system cron definition under `/etc/cron.d/openclaw-vm-memory-oracle`. The resulting jobs invoke the Skill repeatedly and survive the original Skill ...[truncated 2450 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove automatic invocation of `install-cron` from cloud-init. Require a separate, explicit administrator deployment step. 2. Prefer a user-scoped systemd timer or user crontab running under a dedicated, unprivileged OpenClaw service account. 3. If system cron is essential, ship the exact cron-generation implementation for review and document the required privilege boundary accurately. 4. Pin the absolute OpenClaw executable path, Skill installation path, and Skill version in scheduled commands. 5. Ensure the cron file is owned by root, is not writable by the service account, and has restrictive permissions such as `0644`. 6. Avoid mutable or user-controlled `PATH`, working directories, environment variables, and executable lookup locations in scheduled jobs. 7. Update the manifest to declare all actual filesystem targets, including `/etc/cron.d/openclaw-vm-memory-oracle` and `/var/log/openclaw`. 8. Document the exact user under which each scheduled job executes and ensure it has access only to the configured memory directory. 9. Provide an uninstall action that safely removes the scheduler entry and related log configuration. 10. Consider requiring an integrity-verified, version-pinned Skill package before every scheduled invocation. ]]>
