Files
kernel-automation/agent/kernelwatch-agent.service
T
patrickandClaude Opus 5.5 f35cc007f5
CI / tests (Python 3.10) (pull_request) Successful in 15s
CI / tests (Python 3.11) (pull_request) Successful in 15s
CI / tests (Python 3.12) (pull_request) Successful in 15s
CI / tests (Python 3.13) (pull_request) Successful in 15s
CI / lint (pull_request) Successful in 3s
Optionally refresh apt package lists before each report
The agent's dist-upgrade simulation already finds new-ABI kernels and
security updates, but only once apt's lists know about them. Debian
doesn't refresh lists by default, so a kernel security release could
stay invisible until someone ran apt update.

install.sh --with-apt-update adds a marker that enables
kernelwatch-apt-update.service, a sandboxed root oneshot the agent pulls
in before each report. Failures (no network, apt lock held) are ignored
so the report still goes out. deploy.sh now ships the unit; a test keeps
deploy.sh's file list in sync with what install.sh uses.

Agent 0.3.2, server 0.3.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 17:13:55 -04:00

36 lines
1.0 KiB
Desktop File

[Unit]
Description=Report kernel and update status to kernelwatch
Wants=network-online.target kernelwatch-needrestart.service kernelwatch-apt-update.service
After=network-online.target apt-daily.service kernelwatch-needrestart.service kernelwatch-apt-update.service
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/kernelwatch-agent
LoadCredential=token:/etc/kernelwatch/agent.token
# Everything the agent reads is world-readable, so it runs as a throwaway
# unprivileged user. The token credential is made readable to that user.
DynamicUser=yes
CapabilityBoundingSet=
AmbientCapabilities=
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
SystemCallArchitectures=native
SystemCallFilter=@system-service
UMask=0077