diff options
| author | tv <tv@krebsco.de> | 2026-12-01 01:59:16 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-12-01 01:59:16 +0000 |
| commit | 2af90fd35ea8a0aafb9156653f5b28cbac4e1677 (patch) | |
| tree | c2eceb7e2dae9625bb4e5a994e13151e11fd44d4 /nix/module.nix | |
| parent | 5804d2b952ebead3d9bc238fc8db20af6563fddc (diff) | |
By bubblewrap: everything read-only but OUT (and IN bound again after a
fresh /tmp), a new /dev and /proc, namespaces of their own (no network),
no capabilities, a new session, gone with the receptor. The setting
sandbox is bwrap (found in the receptor's PATH, as the programs'
environment is empty), or none; the module sets its bubblewrap. The
tests run their programs in it where bubblewrap can make one (not in
Nix's build sandbox), and a test checks that a program can't write
outside OUT, nor into IN, and has no network nor environment.
Diffstat (limited to 'nix/module.nix')
| -rw-r--r-- | nix/module.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nix/module.nix b/nix/module.nix index a273d45..10623d1 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -144,6 +144,8 @@ let run-dir = cfg.runDir; # Started again by --apply if it failed (for want of the state, at boot). unit = "enstate.service"; + # Validators and renderers run in it. + sandbox = "${pkgs.bubblewrap}/bin/bwrap"; }; enstate = lib.getExe cfg.package; |
