T06 · System Persistence
Error
- Location
- SKILL.md:169
- Finding
- Recurring Agent Cron Job Creates Cross-Session Persistence<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 169-174 **Vulnerability Type**: Persistent scheduled Agent execution **Risk Level**: High ### Vulnerable Code ```text ## Scheduled Inspection (Cron Job) For important projects, a periodic cron job can be configured to inspect progress: schedule: kind=cron, expr="0 */4 * * *" payload: kind=agentTurn, message="Read projects/<name>/progress.md and features.json, and check whether any feature has remained blocked for more than three sessions. If so, output a brief report." ``` The displayed text is an English rendering of the source instructions; the cron expression and configuration fields are unchanged. ### Technical Analysis The Skill instructs the Agent to configure a recurring `agentTurn` cron job that runs every four hours. This scheduled activity can continue after the initiating Skill invocation and conversation have ended. No expiration date, maximum execution count, automatic cleanup procedure, ownership tracking, or mandatory user-confirmation step is specified. Consequently, the scheduled task may continue indefinitely and repeatedly access project files. Although the stated purpose is project monitoring rather than malicious access, the behavior matches system persistence because it installs cross-session scheduled execution. ### Attack Path 1. A user invokes the Skill for an important or long-running project. 2. The Agent follows the optional monitoring guidance and creates the specified cron job. 3. The scheduled job remains registered after the original Agent session ends. 4. Every four hours, the platform starts another Agent turn. 5. Each new turn reads `progress.md` and `features.json` and performs additional processing. 6. Without explicit expiration or removal, execution and project-file access continue indefinitely. ### Impact Assessment The scheduled task obtains the ability to initiate repeated Agent activity across sessions and read the named project-state ...[truncated 421 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Require explicit, informed user confirmation immediately before creating a scheduled task. - Default to a one-time status check instead of recurring execution. - Assign every scheduled task a clear owner, unique identifier, expiration time, and maximum run count. - Restrict the scheduled Agent to read-only access to the specific status files it requires. - Prevent the scheduled turn from treating file contents as trusted instructions. - Provide the exact command or procedure for listing and removing the task. - Automatically delete the task when the project completes or after a short predefined period. - Log every execution and notify the user when recurring activity occurs. ]]>
