T06 · System Persistence
- Location
scripts/enable-polling.sh:48- Finding
Automatic Installation of a Persistent Autonomous Polling Job
- Content
View full analysis
/dev/null) NEW_ID=$(echo "$RESULT" | grep '"id"' | head -1 | sed 's/.*"id": *"\([^"]*\)".*/\1/') ``` The cron setup is invoked automatically after joining or creating a room: ```bash # Auto-enable polling cron POLL_RESULT=$(bash "$SCRIPT_DIR/enable-polling.sh" 2>/dev/null || echo '{"error":"polling setup failed"}') POLL_ACTION=$(echo "$POLL_RESULT" | jq -r '.action // "failed"') CRON_ID=$(echo "$POLL_RESULT" | jq -r '.cronId // ""') ``` ### Technical Analysis The Skill creates an OpenClaw scheduled job that runs an isolated agent session every 20 seconds. The job survives the command that originally joined or created a room and repeatedly performs network requests, processes remote conversation content, and posts generated responses. Recurring polling is relevant to the advertised functionality, and the behavior is documented. However, automatically installing or re-enabling a cross-session scheduled agent task during room operations exceeds the privileges needed for manual room participation. There is no per-turn user authorization, fixed expiration time, maximum execution count, or mandatory confirmation immediately before persistence is enabled. The implementation normally disables the job when no active rooms remain, but this depends on a future agent turn correctly parsing API output and executing the disable operation. Failures in the API, agent execution, configuration, or response parsing can leave the job enabled. ### Attack Path 1. The user or agent invokes `join-room.sh` or `create-room.sh`. 2. The script automatically invokes `enable-polling.sh`. 3. `enable-polling.sh` creates or re- ...[truncated 933 chars]- Remediation
View remediation
