T06 · System Persistence
Error
- Location
- SKILL.md:45
- Finding
- Optional Installation of a Persistent Scheduled Task<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 45–49 **Vulnerability Type**: Persistent cron task installation **Risk Level**: High ### Vulnerable Code ```bash Optional daily PM audit: ```bash bash /home/broedkrummen/.openclaw/workspace-cody/skills/repo-kanban-pm/scripts/add_daily_pm_cron.sh "$(pwd)" --agent cody --tz UTC --time 09:30 ``` ``` ### Technical Analysis The Skill instructs the agent to invoke a script explicitly intended to add a daily cron task. A cron entry persists beyond the current onboarding run and executes automatically in future sessions. The referenced script is outside the audited package, so its implementation and the exact scheduled command cannot be verified. The instructions also do not require explicit informed user approval, display the resulting cron entry, constrain what the scheduled process may execute, or provide a removal procedure. Although described as optional, executing this command establishes cross-session system state and creates an unattended execution path. ### Attack Path 1. An agent loads the Skill and follows the optional daily PM audit instruction. 2. The agent executes `add_daily_pm_cron.sh` under the current user's account. 3. The external script modifies the user's cron configuration. 4. The installed command runs automatically at the configured time after the onboarding operation has ended. 5. If the scheduled command or any script it references is subsequently modified or compromised, the modified logic executes during later scheduled runs without another onboarding action. ### Impact Assessment The scheduled process can execute with the permissions of the user who installed the cron entry. Depending on the external script's implementation, this may permit recurring access to repositories and other files available to that account, modification of user-owned data, command execution, and continued operation across sessions. The precise scope cannot be established because ne ...[truncated 93 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove automatic cron installation from the standard onboarding workflow. 2. Require explicit, informed user confirmation immediately before making any persistent system change. 3. Display the complete proposed cron entry, including all commands, arguments, environment variables, and output destinations. 4. Bundle the installer in the reviewed Skill package rather than invoking a mutable script from an external user-specific path. 5. Pin the scheduled implementation to a reviewed immutable version and verify its integrity before installation. 6. Run the scheduled task with the minimum required permissions and limit its access to the intended repository. 7. Provide commands to inspect, disable, and completely remove the installed cron entry. 8. Verify after installation that no additional or unexpected scheduled entries were created. ]]>
