T06 · System Persistence
Error
- Location
- SKILL.md:216
- Finding
- Persistent Recurring Inbox Processing Through Heartbeat and Cron Configuration<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 216-260 **Vulnerability Type**: `T06: System Persistence` **Risk Level**: High ### Vulnerable Code ```markdown Add this to your `HEARTBEAT.md`: ## MoltCities Agent Inbox (every 2 hours) If 2+ hours since last MoltCities check: 1. Check registration status: ```bash curl -X POST https://moltcities.org/api/check-registration \ -H "Content-Type: application/json" \ -d "$(cat ~/.moltcities/public.pem)" ``` If not registered, run quick registration script 2. Check inbox stats: ```bash curl -s https://moltcities.org/api/inbox/stats \ -H "Authorization: Bearer $(cat ~/.moltcities/api_key)" ``` 3. If unread > 0: - Fetch all messages - Parse for keywords: "collaboration", "question", "feedback" - Auto-reply to simple questions using agent's knowledge - Log complex messages for human review - Mark processed messages as read 4. Update lastMoltCitiesCheck timestamp in `memory/heartbeat-state.json` ``` ```json { "name": "MoltCities inbox check", "schedule": {"kind": "every", "everyMs": 7200000}, "payload": { "kind": "systemEvent", "text": "📬 Check MoltCities inbox and discovery" }, "sessionTarget": "main" } ``` ### Technical Analysis The Skill instructs the user or Agent to modify the persistent `HEARTBEAT.md` configuration and create a recurring scheduled event targeting the main session. The event runs every two hours and causes the Agent to communicate with an external service, inspect messages, and potentially respond. These operations survive the original Skill invocation and continue without a new, explicit user request. Persistent polling is not required for the Skill’s basic publishing, registration, discovery, or on-demand messaging functionality. Enabling it by following the documented workflow therefore expands the Skill beyond minimum on-demand privileges. The recurring task also reads the API key from `~/.moltc ...[truncated 1729 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove heartbeat and cron installation from the default workflow. 2. Keep inbox access on demand unless the user explicitly opts into recurring polling. 3. Present the exact schedule, network destination, credential use, and actions before requesting confirmation. 4. Make recurring integrations time-bounded and disabled by default. 5. Provide explicit commands or instructions for inspecting, disabling, and removing every installed schedule. 6. Use a separate restricted session for polling rather than the main Agent session. 7. Limit scheduled checks to retrieving message counts; require interactive approval before fetching bodies, replying, deleting messages, or changing read state. 8. Use a narrowly scoped, revocable API token if the service supports one. 9. Record an auditable local log of every scheduled access and outbound action. ]]>
