Content is moved verbatim (checked line by line against the old README). Each page gets a title and a link back to the README; H3 sections that become pages of their own are promoted to H2. The README itself is trimmed next. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Security notes
- Host identity comes from the token, not the payload. A host can only report as itself. Tokens are 256-bit random values; only their SHA-256 is stored.
- Report rate limit. A report arriving less than
report_min_interval_seconds(default 30) after the host's previous one gets HTTP 429 with aRetry-Afterheader, and isn't stored. So a stuck agent or a leaked token can't flood the database or push real history off the host page. The agent's curl waits out theRetry-Afterand retries, so runningsystemctl start kernelwatch-agenttwice in a row just pauses briefly. Set it to0to disable. - Livepatch status runs in a separate root unit with no network access and a
read-only filesystem. It has no capability bound, syscall filter or
NoNewPrivileges, because the snap's setuidsnap-confinecan't run under them (tested:NoNewPrivileges=yesfails with "cannot change profile for the next exec call"). It only runscanonical-livepatch status. - needrestart runs in a separate root unit with
PrivateNetwork=yes, a capability set of justCAP_SYS_PTRACE+CAP_DAC_READ_SEARCH(to read other processes' memory maps), a read-only filesystem except/run/kernelwatch, and-r l(list, never restart). - apt-get update (with
--with-apt-update) runs as root with network access, like apt's ownapt-daily.service, but sandboxed: no access to home directories, devices or kernel settings. apt drops to its_aptuser for the downloads, and nothing gets installed. - The agent runs as a throwaway unprivileged user (
DynamicUser=yes) with no capabilities, a read-only filesystem view and a syscall filter. The token reaches it throughLoadCredential=and goes to curl on stdin, so it never appears in a process listing. - The dashboard uses scrypt-hashed passwords, server-side sessions,
HttpOnly+Secure+SameSite=Strictcookies, an Origin check on form posts, per-IP login rate limiting, and a strict CSP. Everything a host reports is HTML-escaped. - It's read-only by design. The server can't make hosts do anything. Adding remote actions (like "reboot this host") would turn it into a remote-execution system; think hard before doing that.