T06 · System Persistence
Error
- Location
- references/agent-guide.md:76
- Finding
- Persistent Daily Update Task Executes Across Sessions<![CDATA[ ## Vulnerability Details **File Location**: `references/agent-guide.md:76-101` **Vulnerability Type**: T06: System Persistence **Risk Level**: Critical The Skill directs the Agent to register a daily scheduled task that survives the initiating session, wakes an isolated Agent session, and performs software-management operations automatically. ### Vulnerable Code ```bash ## Step 3: Add Cron Job The recommended approach is to use Clawdbot's built-in cron with an isolated session: clawdbot cron add \ --name "Daily Auto-Update" \ --cron "0 4 * * *" \ --tz "America/Los_Angeles" \ --session isolated \ --wake now \ --deliver \ --message "Run the daily auto-update routine: 1. Check and update Clawdbot: - For npm installs: npm update -g clawdbot@latest - For source installs: clawdbot update - Then run: clawdbot doctor --yes 2. Update all skills: - Run: clawdhub update --all 3. Report back with: - Clawdbot version before/after - List of skills that were updated (name + old version → new version) - Any errors encountered Format the summary clearly for the user." ``` ### Technical Analysis The `clawdbot cron add` command creates a durable scheduled execution mechanism. The `--cron "0 4 * * *"` option runs it every day, while `--session isolated` and `--wake now` permit execution independently of the session in which the Skill was configured. Although persistence is consistent with the advertised auto-update function, it creates a recurring execution path capable of changing globally installed software and all installed Skills without obtaining new authorization for each run. The security properties of future executions consequently depend on the continued integrity of Clawdbot, ClawdHub, package registries, publisher accounts, and the scheduled message. ### Attack Path 1. A user asks the Agent to configure automatic updates. 2. The Agent executes the supplied `clawdbot cron add` command. 3. A persistent daily job is ...[truncated 1000 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Default to a manual update-check workflow rather than creating a persistent task automatically. - Obtain explicit, informed confirmation immediately before registering the cron job. - Display the exact schedule, commands, target installations, execution identity, and affected directories before confirmation. - Separate update discovery from installation: run a dry check first and require approval for the identified versions. - Support one-shot jobs, expiration dates, and automatic removal after a defined number of runs. - Restrict the scheduled task to a dedicated least-privileged account. - Provide clear commands for inspecting, disabling, and removing the scheduled task. - Record every execution and preserve reliable success and failure status. ]]>
