T06 · System Persistence
- Location
references/initialization.md:15- Finding
Persistent Scheduled Execution Through Cron and LaunchAgents
- Content
View full analysis
> ./assets/logs/cron.log 2>&1 0 3 * * * cd /path/to/skills/dev-team && ./scripts/cleanup-worktrees.sh >> ./assets/logs/cleanup.log 2>&1 10 3 * * * cd /path/to/skills/dev-team && ./scripts/prune-history.sh --keep-days 7 --keep-count 50 >> ./assets/logs/prune.log 2>&1 ``` ```xml Label com.dev-team.agent-check ProgramArguments /bin/bash /path/to/skills/dev-team/scripts/check-agents.sh StartInterval 600 ``` ```bash launchctl load ~/Library/LaunchAgents/com.dev-team.agent-check.plist ``` ### Technical Analysis The initialization guide instructs users to establish recurring execution through OpenClaw cron, the operating-system crontab, or a macOS LaunchAgent. These mechanisms survive the original Skill session and repeatedly execute scripts with the permissions of the account that registered them. Periodic monitoring and cleanup are relevant to multi-agent orchestration, so the mechanism has a legitimate operati ...[truncated 1318 chars]- Remediation
View remediation
` - removal of the relevant crontab entries - `launchctl unload ` followed by deletion of the plist - Run scheduled tasks in a dedicated, least-privileged account or isolated execution environment. - Use absolute, administrator-approved paths and reject writable or symlinked script locations. - Verify script ownership, permissions, and integrity before every scheduled execution. - Restrict inherited environment variables and credential access. - Log registration, execution, updates, and removal of persistent jobs. ]]>
