feat: 🔒 Harden Systemd unit config

This commit is contained in:
Jesse Wierzbinski 2025-08-09 17:15:05 +02:00
parent a6c9d6cd4f
commit 4eae4cd062
No known key found for this signature in database

View file

@ -123,6 +123,28 @@ in {
StandardError = "journal"; StandardError = "journal";
SyslogIdentifier = "${name}"; SyslogIdentifier = "${name}";
# Hardening
CapabilityBoundingSet = [""];
LockPersonality = true;
PrivateMounts = true;
PrivateTmp = true;
ProcSubset = "pid";
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectProc = "invisible";
ProtectSystem = "strict";
RestrictNamespaces = true;
RestrictRealtime = true;
RestrictSUIDSGID = true;
SystemCallArchitectures = "native";
RemoveIPC = true;
NoNewPrivileges = true;
Environment = [ Environment = [
"CONFIG_LOCATION=${configFile}" "CONFIG_LOCATION=${configFile}"
]; ];