readings-window
aien-dev/readings-window
Brought by drakestapleton
readings-window / scripts / readings-sandbox.conf
| 1 | # Sandbox drop-in for readings-window.service and readings-collect.service (install as |
| 2 | # /etc/systemd/system/<unit>.service.d/sandbox.conf, then daemon-reload and restart the unit). |
| 3 | # Still uid 0, because the token, the TLS key and the ssh key to the Spark are root-owned mode 600, but with no |
| 4 | # capabilities, a read-only system and home, and one writable directory. systemd-analyze security: 9.6 -> 1.7. |
| 5 | # Undo: remove the file, daemon-reload, restart. |
| 6 | [Service] |
| 7 | NoNewPrivileges=yes |
| 8 | CapabilityBoundingSet= |
| 9 | AmbientCapabilities= |
| 10 | ProtectSystem=strict |
| 11 | ReadWritePaths=/var/lib/readings-window |
| 12 | ProtectHome=read-only |
| 13 | PrivateTmp=yes |
| 14 | PrivateDevices=yes |
| 15 | ProtectKernelTunables=yes |
| 16 | ProtectKernelModules=yes |
| 17 | ProtectKernelLogs=yes |
| 18 | ProtectControlGroups=yes |
| 19 | ProtectClock=yes |
| 20 | ProtectHostname=yes |
| 21 | ProtectProc=invisible |
| 22 | ProcSubset=pid |
| 23 | RestrictNamespaces=yes |
| 24 | RestrictRealtime=yes |
| 25 | RestrictSUIDSGID=yes |
| 26 | LockPersonality=yes |
| 27 | MemoryDenyWriteExecute=yes |
| 28 | RemoveIPC=yes |
| 29 | RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX |
| 30 | SystemCallArchitectures=native |
| 31 | SystemCallFilter=@system-service |
| 32 | SystemCallFilter=~@privileged @resources |
| 33 | UMask=0077 |