mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
feat: 🔒 Harden Systemd unit config
This commit is contained in:
parent
a6c9d6cd4f
commit
4eae4cd062
|
|
@ -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}"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue