strawberry/scripts/strawberry-update.service
trvon fadc6363f9
Add policy, threat-intel feeds and OpenSnitch containment
PolicyStore (allowlist, protection settings, operator actions), the
rule/feed updater with HTTPS-only fetches and a systemd timer, IOC
hash/domain/network sets, OpenSnitch blocklist containment, the root
control socket (SCM_RIGHTS credentials, verb allowlist) and scanner
health snapshots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:17:05 -06:00

48 lines
1.4 KiB
Desktop File

[Unit]
Description=Strawberry YARA rule feed update
Documentation=https://github.com/trvon/strawberry
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/strawberry --update-rules /etc/strawberry/strawberry.conf
Environment=XDG_DATA_HOME=/var/lib
TimeoutStartSec=15min
# Retry later on failure (e.g. offline, GitHub rate limit); the previous rules stay active.
Restart=on-failure
RestartSec=1h
# Downloads untrusted content, so it runs with no capabilities, can only write
# the feeds directory, and never touches the scanner's evidence database.
# Group=strawberry lets it ask the daemon to reload rules over the control socket.
User=root
Group=strawberry
UMask=0027
CapabilityBoundingSet=
AmbientCapabilities=
NoNewPrivileges=true
StateDirectory=strawberry/feeds
StateDirectoryMode=0750
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
ProtectClock=true
ProtectHostname=true
ProtectProc=invisible
ProcSubset=pid
RestrictNamespaces=true
RestrictRealtime=true
RestrictSUIDSGID=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@privileged @resources
SystemCallErrorNumber=EPERM