T06 · System Persistence
Warning
- Location
- SKILL.md:29
- Finding
- Persistent Scheduled Agent Execution Through OpenClaw Cron<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 29-45 **Vulnerability Type**: Persistent scheduled task **Risk Level**: Medium ### Complete Code Snippet ```bash ## Automatischer Versand 1. **Cron-Job 07:30 (Beispiel):** ```bash openclaw cron add <<'JSON' { "name": "tuebingen-forecast-graphic", "schedule": { "kind": "cron", "expr": "30 7 * * *", "tz": "Europe/Berlin" }, "sessionTarget": "isolated", "payload": { "kind": "agentTurn", "model": "default", "message": "Run `/tmp/tuebingen-plot/bin/python skills/tuebingen-weather-graphics/scripts/generate_forecast_graph.py --output data/weather/tuebingen_forecast.png`. Send Master the summary text plus attach the PNG." } } JSON ``` 2. **Telegram Versand:** `message.send` mit `media=data/weather/tuebingen_forecast.png`. ``` ### Technical Analysis The documented setup registers a daily OpenClaw cron entry that persists after the initial Skill execution. At 07:30 each day, the entry starts an isolated Agent turn, directs it to execute a script from a mutable local path, and requests transmission of the generated output through Telegram. Although weather delivery is the stated purpose and installation requires the user to run the command, the scheduled task creates a durable execution mechanism. The task does not pin or verify the identity or integrity of the script before each execution. If an attacker or another process later gains write access to the referenced script or its Python environment, the persistent scheduler could repeatedly execute altered code under the scheduler's permissions. The configuration also does not document how to inspect, disable, or remove the task, increasing the possibility that users will retain unattended execution longer than intended. ### Attack Path 1. A user follows the automatic-delivery instructions and runs `openclaw cron add`. 2. OpenClaw creates the persistent `tuebingen-forecast-graphic` ...[truncated 1237 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make scheduled execution explicitly opt-in and display a clear warning that the task persists across sessions. 2. Document commands for listing, disabling, and permanently removing the cron entry. 3. Reference a canonical absolute script path rather than a mutable relative project path. 4. Store the script and virtual environment in a location writable only by the owning administrative account; avoid long-lived executable environments under `/tmp`. 5. Before each execution, verify the script and dependency environment against an approved cryptographic hash or signed release. 6. Prefer a narrowly scoped non-Agent scheduler when the operation only needs to fetch fixed weather data and generate an image. 7. Restrict the scheduled process to the minimum filesystem, network, and messaging permissions required. 8. Require explicit confirmation before enabling Telegram delivery, and constrain delivery to an approved recipient. ]]>
