T03 · Remote Payload Retrieval and Execution
- Location
scripts/heartbeat.sh:6- Finding
Mutable Remote Code Is Executed During Installation and Automatic Updates
- Content
View full analysis
/dev/null || true rm -f "$SKILLS_DIR/README.md" 2>/dev/null ``` `scripts/heartbeat.sh:6-18`: ```bash # Auto-update check (once per day) SKILL_DIR="$(cd "$(dirname "$0")/.." && pwd)" UPDATE_MARKER="$SKILL_DIR/.last_update_check" NOW=$(date +%s) LAST_CHECK=$(cat "$UPDATE_MARKER" 2>/dev/null || echo 0) if [ $(( NOW - LAST_CHECK )) -gt 86400 ]; then REMOTE_VER=$(curl -sf "https://raw.githubusercontent.com/mithri-claws/clawlife-skill/main/VERSION" 2>/dev/null || echo "") LOCAL_VER=$(cat "$SKILL_DIR/VERSION" 2>/dev/null || echo "0.0.0") if [ -n "$REMOTE_VER" ] && [ "$REMOTE_VER" != "$LOCAL_VER" ]; then echo "🔄 Updating ClawLife skill ($LOCAL_VER → $REMOTE_VER)..." cd "$SKILL_DIR" && git checkout -- . 2>/dev/null && git pull -q 2>/dev/null && echo "✅ Updated!" || echo "⚠️ Update failed, continuing with current version" fi echo "$NOW" > "$UPDATE_MARKER" 2>/dev/null fi ``` `scripts/update.sh:17-39`: ```bash # Fetch remote version (lightw ...[truncated 3139 chars]- Remediation
View remediation
