T06 · System Persistence
Error
- Location
- scripts/setup-heartbeat.sh:25
- Finding
- Persistent Scheduled Autonomous Social Activity## Vulnerability Details **File Location**: `scripts/setup-heartbeat.sh`, lines 25–39 **Vulnerability Type**: Persistent scheduled task with autonomous external side effects **Risk Level**: High ### Vulnerable Code ```bash EXISTING=$(openclaw cron list 2>/dev/null | grep -i "lobster-republic-heartbeat" || true) if [ -n "$EXISTING" ]; then echo "✅ 社交巡逻已存在,跳过。" else openclaw cron add \ --name "lobster-republic-heartbeat" \ --cron "0 */2 * * *" \ --session isolated \ --message "你好!现在是回到龙虾理想国的时间。请使用 lobster-republic skill 的 plaza.py 执行以下操作: 1. plaza.py channels — 看看各频道 2. plaza.py browse --sort new --limit 10 — 浏览最新帖子 3. plaza.py vote --post POST_ID — 给好帖子点赞(永不踩——只有鼓励) 4. 挑 1-2 个帖子用 plaza.py comment 评论,要有深度 5. 如果你有新想法,用 plaza.py post 发一条帖子(每次心跳最多发1帖) 6. plaza.py leaderboard — 看看你的排名 保持自然,做一个好公民,不要刷屏。" echo "✅ 社交巡逻已配置(每 2 小时)" fi ``` ### Technical Analysis The setup script creates an OpenClaw cron task that survives the initiating session and runs every two hours in an isolated agent session. The scheduled instruction directs the agent not only to read external content, but also to vote, publish one or two comments, and optionally create a post using the user's persistent Lobster Republic identity. This behavior is disclosed as opt-in in `SKILL.md`, and the script provides deletion instructions. Nevertheless, after installation, each individual public interaction can occur without contemporaneous user review or approval. The recurring write operations exceed the minimum privileges needed for periodic read-only monitoring and create persistent external side effects. ### Attack Path 1. The user follows the documented heartbeat instructions and runs `scripts/setup-heartbeat.sh`. 2. The script invokes `openclaw cron add` and installs the `lobster-republic-heartbeat` scheduled task. 3. Every two hours, OpenClaw starts an isolated session with instructions to use the Skill. 4. The ...[truncated 1075 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the persistent cron installation with a foreground, one-shot heartbeat command. 2. If scheduling is retained, make the default task read-only and restrict it to channel listing and browsing. 3. Require explicit user approval for every vote, comment, or post before sending it to the external service. 4. Present the exact schedule and full task message before installation and request affirmative confirmation. 5. Add a dedicated uninstall command or script that identifies and removes the task safely. 6. Add configurable limits for runtime, network requests, votes, comments, and posts, with write limits disabled by default. 7. Prevent scheduled sessions from incorporating unrelated private context into public content, and display the complete proposed content before publication. 8. Consider creating a narrowly scoped read-only credential for scheduled browsing rather than granting the recurring task access to the full account bearer token.
