T06 · System Persistence
- Location
scripts/bootstrap.sh:47- Finding
Persistent Third-Party Hooks and Scheduled Agent Tasks
- Content
View full analysis
/dev/null && ok "self-improvement hook" || echo "⚠️ Hook enable failed" else skip "self-improvement hook" fi # --- 6. Cron --- CRONS=$(openclaw cron list --json 2>/dev/null | python3 -c "import sys,json; print(' '.join(j['name'] for j in json.load(sys.stdin).get('jobs',[])))" 2>/dev/null || echo "") add_cron() { local name="$1" cron="$2" timeout="$3" msg="$4" echo "$CRONS" | grep -q "$name" && skip "cron: $name" || { openclaw cron add --name "$name" --cron "$cron" --tz "Asia/Shanghai" --timeout-seconds "$timeout" --message "$msg" 2>/dev/null && ok "cron: $name" || echo "⚠️ cron: $name failed" } } add_cron "weekly-self-reflection" "0 22 * * 0" 600 \ "每周自省: 1. 读取 memory/ 本周日志 2. 更新 MEMORY.md 3. 写报告到 memory/reflection-本周.md 4. 回复 NO_REPLY" add_cron "monthly-learnings-review" "0 21 1 * *" 600 \ "月度学习回顾: 1. 扫描 .learnings/ 中 pending 高优先级条目 2. promote 到 AGENTS.md 或 MEMORY.md 3. 写报告到 memory/learnings-review-本月.md 4. 回复 NO_REPLY" ``` ### Technical Analysis The bootstrap copies a hook obtained from the separately installed `self-improving-agent` package into the persistent OpenClaw hook directory and enables it. It also registers two recurring Agent tasks that survive completion of the bootstrap process. The hook content is neither audited nor integrity-verified before activation. The scheduled tasks are authorized to read historical logs and modify persistent files, including `MEMORY.md` and `AGENTS.md`. Consequently, code or instructions i ...[truncated 1079 chars]- Remediation
View remediation
/dev/null`. ]]>
