P3: wire serve end to end, integration tests, unit file, README

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
ariandClaude Sonnet 5.5 committed 2026-10-15 19:21:53 -04:00
1 parent 936efaf97e
commit acedb9522e
10 files changed
+637 -16

No files matched your search

+51
View File
@@ -0,0 +1,51 @@
[Unit]
Description=skyg-linux-tracker: read-only systemd, journal and Docker monitor (REST, MCP, OTel)
After=network.target docker.service
Wants=docker.service
[Service]
Type=simple
ExecStart=/usr/local/bin/slinuxm serve --config /etc/skyg-linux-tracker.toml
Restart=on-failure
RestartSec=5
TimeoutStopSec=15
# Dedicated user, created beforehand: useradd --system --no-create-home \
# --shell /usr/sbin/nologin skyg
# A static user (not DynamicUser) so `sudo -u skyg slinuxm token ...` can open
# the same token database the service uses.
User=skyg
Group=skyg
# Read the journal. The tracker never writes to it.
SupplementaryGroups=systemd-journal
# WARNING: membership of the docker group is root-equivalent on the host (the
# Docker API can start privileged containers). Prefer pointing
# sources.docker_socket at a read-only socket proxy (see README) and leave this
# commented out. Uncomment only if you accept that risk (DEC-6).
#SupplementaryGroups=docker
# /var/lib/skyg-linux-tracker, owned by the service user, mode 0700.
StateDirectory=skyg-linux-tracker
StateDirectoryMode=0700
# Hardening
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectControlGroups=yes
ProtectClock=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
SystemCallArchitectures=native
CapabilityBoundingSet=
AmbientCapabilities=
[Install]
WantedBy=multi-user.target