T06 · System Persistence
- Location
assets/HEARTBEAT-TEMPLATE.md:56- Finding
Heartbeat Template Recommends Cross-Session Scheduled Persistence
- Content
View full analysis
Vulnerability Details
File Location:
assets/HEARTBEAT-TEMPLATE.md:56-59
Vulnerability Type: Cross-session scheduled task persistence
Risk Level: HighVulnerable Code
markdown ## Persistent Monitoring - Check email/calendar every 2 hours while awake - Monitor for urgent notifications - Use cron jobs for background tasks that survive session breaksTechnical Analysis
The heartbeat template explicitly recommends using cron jobs for background tasks that survive session breaks. A cron entry is persistent system configuration: it continues executing independently after the Skill invocation and agent session have ended.
The same section associates persistent execution with access to email, calendars, and notifications. The template does not define least-privilege restrictions, command allowlists, execution time limits, audit requirements, or an uninstall procedure. If an agent follows this recommendation without explicit operator approval, it can establish recurring system behavior outside the scope of the original session.
The repository does not contain a script that automatically installs a cron job. Exploitation therefore depends on an agent or operator adopting the template and creating the scheduled task.
Attack Path
- An operator installs or copies the heartbeat template into an agent workspace.
- The agent treats the template as operating instructions.
- The agent creates a cron entry to implement the recommended persistent monitoring.
- The scheduled command inherits the permissions and accessible credentials of the account under which it runs.
- The task continues waking or invoking monitoring logic after the initiating session ends.
- A malicious or subsequently poisoned heartbeat instruction can use that persistent execution path to repeatedly access files, email, calendars, or network services.
Impact Assessment
Successful exploitation provides recurring code or agent execution under the privileges ...[truncated 427 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the recommendation to use cron jobs from the default template.
- Require explicit, informed operator approval before creating any scheduled task.
- Display the exact command, schedule, execution identity, accessed resources, and expected network destinations before installation.
- Use a dedicated least-privilege account or sandbox for approved monitoring tasks.
- Restrict scheduled commands to a reviewed allowlist rather than dynamically generated instructions.
- Add execution timeouts, rate limits, structured audit logs, and failure notifications.
- Provide commands for listing, disabling, and deleting every scheduler entry created from the template.
- Require periodic reauthorization and automatically expire scheduled tasks when they are no longer needed.
