The basic approach is copied from systemd-journal-gatewayd.service,
with some additions to lock down unneeded network access.
FileDescriptorName=varlink
SocketMode=0666
Accept=yes
+MaxConnectionsPerSource=16
RemoveOnStop=yes
[Install]
Description=Report System Basic Facts
[Service]
+CapabilityBoundingSet=
+DeviceAllow=
+DynamicUser=yes
+LockPersonality=yes
+MemoryDenyWriteExecute=yes
+PrivateDevices=yes
+PrivateIPC=yes
+PrivateNetwork=yes
+PrivateTmp=disconnected
+ProtectControlGroups=yes
+ProtectHome=yes
+ProtectHostname=yes
+ProtectKernelLogs=yes
+ProtectKernelModules=yes
+ProtectKernelTunables=yes
+ProtectSystem=strict
+RestrictAddressFamilies=AF_UNIX
+RestrictNamespaces=yes
+RestrictRealtime=yes
+RestrictSUIDSGID=yes
+SystemCallArchitectures=native
+SystemCallErrorNumber=EPERM
+SystemCallFilter=@system-service
+
ExecStart={{LIBEXECDIR}}/systemd-report-basic