Included in ProUp to 3 machines

PocketClaw Watch

The CVE alerts of Pro tell you a flaw exists in a tool you declared. Watch tells you whether it hits the version that actually runs on your machine, what that machine exposes, and when either changes. A short, readable shell script reports every 6 hours; it reads, it never changes anything.

Part of PocketClaw Pro, same subscription and same 7-day trial. No extra price.
Add a machine

What it does

  1. Finds the agents and their real version. OpenClaw, Hermes Agent, ZeroClaw, NanoClaw, IronClaw, Nanobot, Ollama: from the command line (openclaw --version and the like) or from the image tag of a running container.
  2. Crosses that version with the CVE tracker, with the same version rules as the CVE pages and the scanner. You are alerted by email, and on Discord or Slack if you set a webhook, when a CVE affects the installed version, with the release that fixes it. Exploited ones (CISA KEV) come first. Each CVE is sent once per machine.
  3. Says whether to update now or wait. For each agent: the CVEs the target release fixes, against regressions reported on that release in the project's public GitHub issues (the “regression” label, or a title that says regression or “after update”). A fix for an exploited, critical or high CVE means update now. When a piece of data is missing, the page says “unknown” instead of guessing. With the command to go back if the update breaks something: openclaw update --tag <version> --dry-run for OpenClaw, OLLAMA_VERSION=<version> with Ollama's install script, from their docs.
  4. Alerts on drift: a new port listening beyond loopback, a Docker port published on 0.0.0.0 (Docker bypasses ufw), a new critical or warn finding in openclaw security audit, and a machine that stops reporting for more than 24 hours. The first report sets the baseline.

Your dashboard shows each machine: last report, agents and versions, the CVEs that hit them, the verdict, the exposure table, the history of drift, and the token.

Install

Add the machine on your dashboard; it gives you a token for that machine and this command. Run it as the user that runs the agent. No root needed.

curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- pcw_YOUR_MACHINE_TOKEN

It puts the agent in ~/.local/share/pocketclaw-watch/, the token in ~/.config/pocketclaw-watch/token (mode 600), adds one line to your crontab (or a systemd user timer when there is no crontab) to run every 6 hours, and sends a first report. It needs sh and curl; node only to read OpenClaw's JSON audit, and OpenClaw already requires it. Linux and macOS.

See what would be sent first

The dry run downloads the agent to a temporary folder and prints the report. It installs nothing and sends nothing.

curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- --dry-run

On an installed machine: sh ~/.local/share/pocketclaw-watch/pocketclaw-watch.sh --dry-run. An example of the output:

# pocketclaw-watch 1
collector: 1.0.0
date: 2026-11-26T12:00:00Z
os: Linux 6.8.0-49-generic
arch: aarch64
agent: openclaw 2026.1.20
agent: ollama 0.12.3
listen: 127.0.0.1:18789 node
listen: 0.0.0.0:11434 ollama
listen: 0.0.0.0:22 sshd
docker: ghcr.io/open-webui/open-webui:main | 0.0.0.0:3000->8080/tcp
front: tailscale
audit: ok
finding: warn config.insecure_or_dangerous_flags
finding: info security.trust_model.group_scope_main

What is sent, and what never is

Sent

  • The name and version of the watched agents found, and of Ollama
  • Listening TCP ports, the address each is bound to, and the process name when your user can see it
  • Running containers: image name and tag, and their published ports
  • Whether Caddy, nginx, Traefik, HAProxy, Tailscale, cloudflared or ngrok run
  • The check id and severity of each openclaw security audit --json finding, nothing else from it
  • The OS name and kernel release, the CPU architecture, the date

Never

  • Keys, tokens, passwords, cookies, environment variables
  • Configuration files or their contents (unlike the one-time security check, Watch reads none)
  • Prompts, conversations, logs, files, model names
  • The hostname or the IP addresses of your network interfaces beyond the bind address of each port
  • The finding titles and details of the OpenClaw audit, which can contain paths

Everything goes through a filter on your machine that masks anything shaped like a key or a token. Our server runs the filter of the security check again and drops any line where it still finds one, then reads the report with a strict parser: an unexpected line is refused, not stored. We keep the last 20 reports of each machine. Removing the machine on the dashboard deletes them.

Uninstall

curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- --uninstall

Or sh ~/.local/share/pocketclaw-watch/pocketclaw-watch.sh uninstall. Both remove the schedule, the token and the agent. Then remove the machine on your dashboard to delete its history. Revoking or rotating the token on the dashboard stops the machine at once, without touching it.

Limits, said plainly

  • It sees what the installing user can see: a process run by another user listens without its name, and Docker is only read if that user may run docker ps.
  • It knows the CVEs we track, published ones. A release that fixes an unpublished flaw is invisible to it.
  • Every 6 hours, not real time. A port opened and closed between two runs is not seen.
  • It does not test the machine from the outside: a port bound to every interface may still be closed by a firewall in front.

The code

Read it before you run it. The agent: /watch/pocketclaw-watch.sh. The installer: /watch/install.sh.

pocketclaw-watch.sh
#!/bin/sh
# PocketClaw Watch agent, version 1.0.0
# Source: https://pocketclaw.dev/watch/pocketclaw-watch.sh  (docs: https://pocketclaw.dev/watch)
#
# What it does, every 6 hours, as the user that installed it (no root):
#   - reads the version of the agents it finds: openclaw, hermes, zeroclaw,
#     nanoclaw, ironclaw, nanobot, and ollama next to them
#   - lists the TCP ports that listen, with the address they are bound to
#     (ss, or lsof on macOS, or netstat)
#   - lists running containers with their published ports (docker ps)
#   - notes whether Caddy, nginx, Traefik, HAProxy, Tailscale, cloudflared
#     or ngrok run
#   - runs `openclaw security audit --json` when OpenClaw is installed and
#     keeps only the check id and severity of each finding
#   - sends that text, after a local filter that masks anything looking like
#     a key or a token, to https://pocketclaw.dev/api/watch/report
#
# What it never reads or sends: configuration files, environment variables,
# keys, tokens, passwords, chat logs, prompts, file contents, the hostname.
# It changes nothing on the machine besides its own files.
#
# Usage:
#   sh pocketclaw-watch.sh --dry-run   print exactly what would be sent, send nothing
#   sh pocketclaw-watch.sh run         collect and send (what the scheduled task runs)
#   sh pocketclaw-watch.sh uninstall   remove the scheduled task, the token and this script

set -u
LC_ALL=C
export LC_ALL

WATCH_VERSION=1.0.0
ENDPOINT="${POCKETCLAW_WATCH_URL:-https://pocketclaw.dev/api/watch/report}"
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pocketclaw-watch"
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/pocketclaw-watch"
UNIT_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user"

have() { command -v "$1" >/dev/null 2>&1; }

# Same filter as the security check collector; the server filters again
# and drops any line where it still finds a secret.
mask() {
  sed -E \
    -e 's/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----.*/[REDACTED]/' \
    -e 's/sk-[A-Za-z0-9_-]{16,}/[REDACTED]/g' \
    -e 's/(sk|rk|pk)_(live|test)_[A-Za-z0-9]{10,}/[REDACTED]/g' \
    -e 's/(ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{20,}/[REDACTED]/g' \
    -e 's/github_pat_[A-Za-z0-9_]{20,}/[REDACTED]/g' \
    -e 's/xox[abprs]-[A-Za-z0-9-]{10,}/[REDACTED]/g' \
    -e 's/(AKIA|ASIA)[0-9A-Z]{16}/[REDACTED]/g' \
    -e 's/AIza[0-9A-Za-z_-]{30,}/[REDACTED]/g' \
    -e 's/(hf|gsk|npm)_[A-Za-z0-9]{20,}/[REDACTED]/g' \
    -e 's/tskey-[A-Za-z0-9-]{10,}/[REDACTED]/g' \
    -e 's/pcw_[A-Za-z0-9_-]{20,}/[REDACTED]/g' \
    -e 's/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/[REDACTED]/g' \
    -e 's/[0-9]{8,10}:[A-Za-z0-9_-]{35}/[REDACTED]/g' \
    -e 's#(://[^ :/@]+:)[^ @/]+@#\1[REDACTED]@#g' \
    -e 's/(Bearer|Basic|Token) [A-Za-z0-9._~+\/=-]{12,}/\1 [REDACTED]/g' \
    -e 's/[A-Za-z0-9+\/_-]{40,}/[REDACTED]/g'
}

# The name of a listening process. Linux cuts the name ss shows (comm) at 15
# characters ("box-websockify." for box-websockify.py). When this user can
# read the process, take the full name from the executable or from the first
# two words of its command line, and only when it starts with that short
# name: no argument beyond a program or script name is ever kept. Otherwise
# the short name, without a dangling dot.
proc_name() {
  short=${1%.}
  pid=$2
  if [ -n "$short" ] && [ -n "$pid" ]; then
    exe=$(readlink "/proc/$pid/exe" 2>/dev/null)
    a0=""
    a1=""
    if [ -r "/proc/$pid/cmdline" ]; then
      a0=$(tr '\000' '\n' < "/proc/$pid/cmdline" 2>/dev/null | sed -n 1p)
      a1=$(tr '\000' '\n' < "/proc/$pid/cmdline" 2>/dev/null | sed -n 2p)
    fi
    for cand in "${exe##*/}" "${a0##*/}" "${a1##*/}"; do
      case "$cand" in
        "$short"*)
          if [ "${#cand}" -le 60 ]; then
            printf '%s\n' "$cand" | tr -cd 'A-Za-z0-9._:/+-'
            return
          fi
          ;;
      esac
    done
  fi
  printf '%s\n' "$short" | tr -cd 'A-Za-z0-9._:/+-'
}

# First release number printed by "<bin> --version", or "unknown".
version_of() {
  v=$("$1" --version 2>/dev/null | grep -Eo '[0-9]+(\.[0-9]+){1,3}([-+.]?[A-Za-z0-9]+)?' | head -n 1)
  echo "${v:-unknown}"
}

collect() {
  echo "# pocketclaw-watch 1"
  echo "collector: $WATCH_VERSION"
  echo "date: $(date -u +%Y-%m-%dT%H:%M:%SZ)"
  echo "os: $(uname -sr 2>/dev/null | tr -cd 'A-Za-z0-9 ._()+/-')"
  echo "arch: $(uname -m 2>/dev/null | tr -cd 'A-Za-z0-9_-')"

  for pair in openclaw:openclaw hermes:hermes-agent zeroclaw:zeroclaw nanoclaw:nanoclaw ironclaw:ironclaw nanobot:nanobot ollama:ollama; do
    bin=${pair%%:*}
    slug=${pair#*:}
    if have "$bin"; then echo "agent: $slug $(version_of "$bin")"; fi
  done

  # Listening TCP sockets: address:port and the process name when visible.
  # lsof only on macOS: busybox ships an lsof that knows none of these flags.
  if have ss; then
    ss -ltnpH 2>/dev/null | awk '{ u=$6; n=u; sub(/^users:\(\("/, "", n); sub(/".*/, "", n); gsub(/[^A-Za-z0-9._:\/+-]/, "", n); pid=""; if (match(u, /pid=[0-9]+/)) pid=substr(u, RSTART+4, RLENGTH-4); print $4 " " (n == "" ? "-" : n) " " (pid == "" ? "-" : pid) }' |
      while read -r addr name pid; do
        [ "$name" = "-" ] && name=""
        [ "$pid" = "-" ] && pid=""
        echo "listen: $addr $(proc_name "$name" "$pid")"
      done
  elif [ "$(uname -s 2>/dev/null)" = Darwin ] && have lsof; then
    lsof +c 0 -nP -iTCP -sTCP:LISTEN 2>/dev/null | awk 'NR>1 { p=$1; gsub(/[^A-Za-z0-9._:\/+-]/, "", p); sub(/\.$/, "", p); print "listen: " $9 " " p }'
  elif have netstat; then
    netstat -ltn 2>/dev/null | awk '/LISTEN/ { print "listen: " $4 }'
  fi | grep -E '^listen: [^ ]*:[0-9]+( [^ ]*)?$' | sort -u | head -n 300

  # Containers: image (without digest) and published ports.
  if have docker; then
    docker ps --format '{{.Image}} | {{.Ports}}' 2>/dev/null | sed -e 's/@sha256:[0-9a-f]*//' -e 's/^/docker: /' | head -n 120
  fi

  for p in caddy nginx traefik haproxy; do
    if pgrep -x "$p" >/dev/null 2>&1; then echo "front: $p"; fi
  done
  if pgrep -x tailscaled >/dev/null 2>&1; then echo "front: tailscale"; fi
  for p in cloudflared ngrok; do
    if pgrep -x "$p" >/dev/null 2>&1; then echo "front: $p"; fi
  done

  # OpenClaw's own check: only the check id and severity of each finding.
  if have openclaw; then
    if have node; then
      run=""
      if have timeout; then run="timeout 120"; fi
      out=$($run openclaw security audit --json 2>/dev/null | node -e '
let s = "";
process.stdin.on("data", (d) => (s += d)).on("end", () => {
  try {
    const j = JSON.parse(s);
    const r = j && j.report ? j.report : j;
    const list = Array.isArray(r && r.findings) ? r.findings : [];
    console.log("audit: ok");
    for (const f of list.slice(0, 200)) {
      let sev = String((f && f.severity) || "").toLowerCase();
      if (sev === "warning") sev = "warn";
      const id = String((f && f.checkId) || "").replace(/[^A-Za-z0-9._:-]/g, "").slice(0, 120);
      if (id && ["critical", "warn", "info"].includes(sev)) console.log("finding: " + sev + " " + id);
    }
  } catch (e) {
    console.log("audit: error");
  }
});' 2>/dev/null)
      if [ -n "$out" ]; then echo "$out"; else echo "audit: error"; fi
    else
      echo "audit: unavailable"
    fi
  fi
}

send() {
  token_file="$CONF_DIR/token"
  if [ ! -r "$token_file" ]; then
    echo "pocketclaw-watch: no token in $token_file. Install with the command on your dashboard." >&2
    exit 1
  fi
  if ! have curl; then
    echo "pocketclaw-watch: curl is required to send the report." >&2
    exit 1
  fi
  old_umask=$(umask)
  umask 077
  body=$(mktemp)
  hdr=$(mktemp)
  resp=$(mktemp)
  umask "$old_umask"
  trap 'rm -f "$body" "$hdr" "$resp"' EXIT INT TERM
  collect | mask > "$body"
  # The token goes in a header file, not on the command line (other users see command lines).
  printf 'Authorization: Bearer %s\n' "$(cat "$token_file")" > "$hdr"
  code=$(curl -sS -m 30 -o "$resp" -w '%{http_code}' -X POST -H @"$hdr" -H 'Content-Type: text/plain' --data-binary @"$body" "$ENDPOINT" 2>/dev/null)
  if [ "$code" = "200" ]; then
    echo "pocketclaw-watch: report sent."
  else
    echo "pocketclaw-watch: the server answered ${code:-nothing}: $(head -c 300 "$resp" 2>/dev/null)" >&2
    exit 1
  fi
}

uninstall() {
  if have crontab; then
    current=$(crontab -l 2>/dev/null)
    if printf '%s\n' "$current" | grep -q 'pocketclaw-watch'; then
      printf '%s\n' "$current" | grep -v 'pocketclaw-watch' | crontab -
      echo "Removed the cron entry."
    fi
  fi
  if [ -f "$UNIT_DIR/pocketclaw-watch.timer" ]; then
    systemctl --user disable --now pocketclaw-watch.timer >/dev/null 2>&1
    rm -f "$UNIT_DIR/pocketclaw-watch.timer" "$UNIT_DIR/pocketclaw-watch.service"
    systemctl --user daemon-reload >/dev/null 2>&1
    echo "Removed the systemd user timer."
  fi
  rm -rf "$CONF_DIR" "$DATA_DIR"
  echo "Removed the token and the agent. Delete the machine on https://pocketclaw.dev/dashboard/watch to drop its history."
}

case "${1:-}" in
  --dry-run | dry-run)
    collect | mask
    echo "# dry run: nothing was sent" >&2
    ;;
  run) send ;;
  uninstall | --uninstall) uninstall ;;
  *)
    echo "usage: sh pocketclaw-watch.sh --dry-run | run | uninstall" >&2
    exit 2
    ;;
esac
install.sh
#!/bin/sh
# PocketClaw Watch installer
# Source: https://pocketclaw.dev/watch/install.sh  (docs: https://pocketclaw.dev/watch)
#
#   curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- <TOKEN>
#       installs the agent for the current user (no root), stores the token,
#       schedules a run every 6 hours (user crontab, or a systemd user timer
#       when there is no crontab) and sends a first report
#   curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- --dry-run
#       downloads the agent to a temporary folder and prints what it would
#       send; installs nothing, sends nothing
#   curl -fsSL https://pocketclaw.dev/watch/install.sh | sh -s -- --uninstall
#       removes the schedule, the token and the agent
#
# Files it writes (and nothing else):
#   ~/.local/share/pocketclaw-watch/pocketclaw-watch.sh   the agent
#   ~/.config/pocketclaw-watch/token                      the machine token, mode 600
#   one line in your crontab, or ~/.config/systemd/user/pocketclaw-watch.{service,timer}

set -eu
LC_ALL=C
export LC_ALL

BASE="${POCKETCLAW_WATCH_BASE:-https://pocketclaw.dev}"
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/pocketclaw-watch"
CONF_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/pocketclaw-watch"
UNIT_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/systemd/user"
AGENT="$DATA_DIR/pocketclaw-watch.sh"

have() { command -v "$1" >/dev/null 2>&1; }
die() { echo "pocketclaw-watch: $*" >&2; exit 1; }

MODE=install
TOKEN=""
for arg in "$@"; do
  case "$arg" in
    --dry-run) MODE=dry ;;
    --uninstall) MODE=uninstall ;;
    pcw_*) TOKEN="$arg" ;;
    *) die "unknown argument. Usage: sh -s -- <TOKEN> | --dry-run | --uninstall" ;;
  esac
done

have curl || die "curl is required."

fetch_agent() {
  curl -fsSL "$BASE/watch/pocketclaw-watch.sh" -o "$1" || die "could not download the agent from $BASE."
  head -n 1 "$1" | grep -q '^#!/bin/sh' || die "the download is not the agent script."
}

if [ "$MODE" = dry ]; then
  tmp=$(mktemp -d)
  trap 'rm -rf "$tmp"' EXIT INT TERM
  fetch_agent "$tmp/pocketclaw-watch.sh"
  sh "$tmp/pocketclaw-watch.sh" --dry-run
  exit 0
fi

if [ "$MODE" = uninstall ]; then
  if [ -f "$AGENT" ]; then
    sh "$AGENT" uninstall
  else
    echo "Nothing installed for this user ($AGENT not found)."
  fi
  exit 0
fi

[ -n "$TOKEN" ] || die "give the machine token: sh -s -- pcw_... (from https://pocketclaw.dev/dashboard/watch)"
printf '%s' "$TOKEN" | grep -Eq '^pcw_[A-Za-z0-9_-]{32}$' || die "that does not look like a machine token."

if [ "$(id -u)" = "0" ]; then
  echo "Note: running as root. Watch needs no root; install it as the user that runs the agent if you can." >&2
fi

umask 077
mkdir -p "$DATA_DIR" "$CONF_DIR"
fetch_agent "$AGENT"
chmod 700 "$AGENT"
printf '%s\n' "$TOKEN" > "$CONF_DIR/token"
chmod 600 "$CONF_DIR/token"

# A random minute and hour offset, so machines do not all report at once.
rnd=$(od -An -N2 -tu2 /dev/urandom 2>/dev/null | tr -d ' ' || echo $$)
min=$((rnd % 60))
h=$(((rnd / 60) % 6))
hours="$h,$((h + 6)),$((h + 12)),$((h + 18))"

scheduled=no
if have crontab; then
  current=$(crontab -l 2>/dev/null || true)
  if {
    printf '%s\n' "$current" | grep -v 'pocketclaw-watch' | sed '/^$/d' || true
    echo "$min $hours * * * sh \"$AGENT\" run >/dev/null 2>&1 # pocketclaw-watch"
  } | crontab - 2>/dev/null; then
    scheduled=cron
    echo "Scheduled: every 6 hours from your crontab ($min $hours * * *)."
  else
    echo "Your crontab could not be written; trying a systemd user timer." >&2
  fi
fi
if [ "$scheduled" = no ] && have systemctl && systemctl --user show-environment >/dev/null 2>&1; then
  mkdir -p "$UNIT_DIR"
  cat > "$UNIT_DIR/pocketclaw-watch.service" <<EOF
[Unit]
Description=PocketClaw Watch report (read-only)

[Service]
Type=oneshot
ExecStart=/bin/sh $AGENT run
EOF
  cat > "$UNIT_DIR/pocketclaw-watch.timer" <<EOF
[Unit]
Description=PocketClaw Watch, every 6 hours

[Timer]
OnCalendar=*-*-* $h/6:$min:00
Persistent=true

[Install]
WantedBy=timers.target
EOF
  if systemctl --user daemon-reload && systemctl --user enable --now pocketclaw-watch.timer >/dev/null 2>&1; then
    scheduled=systemd
    echo "Scheduled: systemd user timer pocketclaw-watch.timer, every 6 hours."
    echo "A user timer only runs while you are logged in, unless lingering is on: loginctl enable-linger \"$(id -un)\""
  fi
fi
if [ "$scheduled" = no ]; then
  echo "No schedule installed (no usable crontab or systemd user session): run \"sh $AGENT run\" from your own scheduler every 6 hours." >&2
fi

echo "Sending a first report..."
if sh "$AGENT" run; then
  echo "Done. See it on $BASE/dashboard/watch"
else
  echo "The first report did not go through (see above). The schedule stays in place." >&2
fi
echo "What is sent, and never sent: $BASE/watch   Uninstall: sh \"$AGENT\" uninstall"
Watch comes with PocketClaw Pro: CVE alerts on your stack, unlimited scans, and Watch on 3 machines. 7-day trial, cancel any time.
See Pro