T06 · System Persistence
Error
- Location
- references/dual-env-adaptation.md:40
- Finding
- Recurring Autonomous Tasks Create Cross-Session Persistence<![CDATA[ ## Vulnerability Details **File Location**: `references/dual-env-adaptation.md:40-55`; related instructions at `SKILL.md:101-105` **Vulnerability Type**: Scheduled-task and heartbeat persistence **Risk Level**: High ### Vulnerable Code Snippet ```text ### Hermes 环境:Cron Job # 每日自检 cronjob(action='create', name='🔧 Agent 每日自检', schedule='0 8 * * *', prompt='执行 agent-optimization-expert 场景 3(系统健康度巡检)和场景 1(Cron 任务扫描)。检查磁盘/内存/容器/本地服务/所有 cron jobs。如有异常按诊断决策树修复并记录到 learnings/error-log.md。无异常只记录"一切正常"。', deliver='local') # 每周知识更新 cronjob(action='create', name='📚 Agent 知识更新', schedule='0 3 * * 0', prompt='执行 agent-optimization-expert 路径 2(定期知识更新):搜索 Anthropic/OpenAI 最新 Agent 工程实践,对比 references/ 现有内容,发现新模式追加到对应文件。', deliver='local') ``` Related top-level instructions: ```text - Hermes environment → use `cronjob(action='create')` to create daily self-check and weekly knowledge-update tasks - OpenClaw environment → configure a heartbeat checklist in `workspace/HEARTBEAT.md` ``` ### Technical Analysis The Skill is presented as a diagnostic and repair utility, but its integration instructions expand execution beyond the current request by creating recurring Cron jobs or modifying a persistent heartbeat configuration. These mechanisms survive the initiating session and repeatedly grant the Skill access to system state, Cron configuration, containers, local services, logs, and writable knowledge files. Scheduled diagnostics can be legitimate when explicitly requested. However, automatic or setup-driven installation exceeds the minimum privilege necessary for an on-demand diagnostic Skill. The documentation does not require informed, task-specific approval immediately before creating each persistent task, does not define an expiration time, and does not provide removal commands. The weekly task is especially sensitive because it combines persistence, network-derived information, and mutation of trusted Skill files. ### Att ...[truncated 1301 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove recurring task creation from default installation and first-run behavior. 2. Require explicit, informed user approval immediately before each Cron or heartbeat change. 3. Present the exact schedule, command, prompt, writable paths, and expected permissions before approval. 4. Separate one-time diagnostics from optional monitoring installation. 5. Add expiration dates or bounded run counts to recurring tasks. 6. Provide exact commands for listing, disabling, and deleting every installed task. 7. Restrict scheduled diagnostics to read-only operations by default. 8. Require fresh approval before any scheduled task modifies configuration, restarts services, deletes files, or updates Skill content. 9. Record task creation, modification, execution, and removal in an auditable log. 10. Do not treat the presence of Hermes or OpenClaw as authorization to install persistence. ]]>
