T06 · System Persistence
- Location
skills/ironclaw-guardian-evolved/scripts/guardian.sh:86- Finding
Persistent Guardian Performs Autonomous Repair and Recovery Operations
- Content
View full analysis
> /tmp/openclaw-guardian.log 2>&1 & # Verify pgrep -a -f "guardian.sh" tail -f /tmp/openclaw-guardian.log ``` The same instructions state that the guardian should be added to `~/.openclaw/start-gateway.sh` to make it persistent. ```bash # skills/ironclaw-guardian-evolved/scripts/guardian.sh:86-142 monitor_loop() { log "IronClaw Guardian Evolved started" log "Check interval: ${GUARDIAN_CHECK_INTERVAL}s, maximum repairs: ${GUARDIAN_MAX_FIX_ATTEMPTS}, cooldown: ${GUARDIAN_COOLDOWN}s" local fix_attempts=0 local cooldown_active=false while true; do if check_gateway; then fix_attempts=0 cooldown_active=false sleep "$GUARDIAN_CHECK_INTERVAL" continue fi audit_log "gateway_down" "gateway detected as down" if [ "$cooldown_active" = true ]; then sleep "$GUARDIAN_CHECK_INTERVAL" continue fi fix_attempts=$((fix_attempts + 1)) audit_log "doctor_fix_attempt" "attempt $fix_attempts" if run_doctor_fix; then fix_attempts=0 sleep "$GUARDIAN_CHECK_INTERVAL" continue fi if [ "$fix_attempts" -ge "$GUARDIAN_MAX_FIX_ATTEMPTS" ]; then if git_rollback; then restart_gateway fix_attempts=0 else cooldown_active=true sleep "$GUARDIAN_COOLDOWN" fi else sleep "$GUARDIAN_CHECK_INTERVAL" fi done } monitor_loop ``` ### Technical Analysis The documented setup copies the guardian into the user's OpenClaw directory, launc ...[truncated 1292 chars]- Remediation
View remediation
