T06 · System Persistence
Error
- Location
- manifest.yaml:9
- Finding
- Persistent Scheduled Agent Memory Refresh## Vulnerability Details **File Location**: `manifest.yaml:9-13`; supporting installation instructions at `SKILL.md:49-64` and `README.md:10-15` **Vulnerability Type**: Persistent scheduled task affecting agent state **Risk Level**: High ### Vulnerable Code `manifest.yaml:9-13`: ```yaml schedules: - cron: "0 6 * * *" task: "refresh_memory" description: "Every morning at 6AM, distill yesterday's logs and update MEMORY.md" timezone: "Asia/Tokyo" ``` `SKILL.md:49-64`: ```markdown ## Workflow (Manual) 1. 📊 `session_status` → Check context length. 2. **HEARTBEAT.md Edit Example:** ``` - [ ] Refresh: read workspace/{AGENTS.md,IDENTITY.md,SOUL.md,USER.md} → Chain SOUL/USER/IDENTITY + Summarize MEMORY (rotate: 4h, 9AM/1PM/8PM) ``` 3. **Cron Add Command (copy-paste to exec):** ``` cron action=add job='{"name":"agents-refresh-daily","schedule":{"kind":"cron","expr":"0 6 * * *","tz":"Asia/Tokyo"},"payload":{"kind":"systemEvent","text":"[Daily Refresh🐾] read workspace/{AGENTS.md,IDENTITY.md,SOUL.md,USER.md}! Reload SOUL/USER/IDENTITY chain → Keep focus on ToDo/projects! Summarize recent MEMORY/ToDo."},"delivery":{"mode":"announce"},"sessionTarget":"main","task":"refresh_memory"}' ``` 4. Test: `cron action=run jobId=agents-refresh-daily` or wait for heartbeat. ## Rotate Checks (In Heartbeat) - 6AM/9AM, 1PM, 8PM: Reload AGENTS→IDENTITY/SOUL chain + Update MEMORY/ToDo. - Distill recent memory/YYYY-MM-DD.md → MEMORY.md. ``` `README.md:10-15`: ```markdown 3. Cron auto from manifest.yaml or manual `cron add` (copy from Quick Start). ## Usage - **Auto:** 6AM cron reloads AGENTS/IDENTITY/SOUL + MEMORY distillation. - **Manual:** `session_status` → edit HEARTBEAT.md → cron test run. - **Heartbeat:** 4h rotate (9AM/1PM/8PM) for long-session personality keep. ``` ### Technical Analysis The skill declares a recurring cron schedule in its manifest and separately ins ...[truncated 2129 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the automatic `schedules` entry from `manifest.yaml`. 2. Remove the copy-paste `cron action=add` command and heartbeat persistence instructions from `SKILL.md`. 3. Make memory refreshes explicitly user-initiated and limited to a single execution. 4. Before writing `MEMORY.md`, present the proposed changes and require explicit user confirmation. 5. Do not modify `HEARTBEAT.md` unless the user separately authorizes that exact persistent change. 6. If scheduling is essential, use an opt-in installation flow that clearly identifies the schedule, target session, files accessed, retention period, and removal procedure. 7. Provide a reliable uninstall operation that deletes the scheduled job and removes installed heartbeat entries. 8. Apply least privilege by granting access only to files selected for a specific refresh rather than all identity, user, and historical memory files by default. 9. Add safeguards preventing distilled log content from being treated as executable instructions or immutable agent rules.
