aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox
AgeCommit message (Collapse)Author
2026-07-07test: move nix filesOphestra
These are too much clutter. Move them to test directory until the test suite replacement is upstreamed. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-07nix: work around systemd nondeterminismOphestra
NixOS switched to systemd initramfs by default. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-06nix: update flake lockOphestra
Was unfortunately not able to implement vm test suite before this release. Hopefully the last nixos update we have to follow. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-04container/initoverlay: configure via fsconfigOphestra
This works around the page size limit at the cost of negligible performance regressions. Closes #34. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-23nix: remove all explicit timeoutsOphestra
These were useful during development because timing out is often the only indication of failure due to the terrible design of nixos vm test harness. This has become a nuisance however especially when the system is under load, so remove explicit values and fall back to the ludicrously high default. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-28cmd/hakurei: rename app to runOphestra
The run command was a legacy holdover from very early days and is only useful for testing and demonstration these days. This change also renames it to exec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15test: check shim private dir cleanupOphestra
This asserts that no shim private dir was left behind after all containers terminate. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15internal/outcome: expose pipewire via pipewire-pulseOphestra
This no longer exposes the pipewire socket to the container, and instead mediates access via pipewire-pulse. This makes insecure parts of the protocol inaccessible as explained in the doc comment in hst. Closes #29. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-12nix: update flake lockOphestra
NixOS 25.11 introduces a crash in cage and an intermittent crash in foot. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08treewide: include PipeWire op and enforce PulseAudio checkOphestra
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module. Closes #26. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-12test: move package sandbox internalOphestra
This should never be used outside vm tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-12container: set FD_CLOEXEC on all open filesOphestra
While fd created from this side always has the FD_CLOEXEC flag, the same is not true for files left open by the parent. This change prevents those files from leaking into the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-11container/init: close setup pipe earlyOphestra
This prevents leaking the setup pipe. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-04hst/grp_pwd: specify new uid formatOphestra
This leaves slots available for additional uid ranges in Rosa OS. This breaks all existing installations! Users are required to fix ownership manually. Closes #18. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19hst/container: optional runtime and tmpdir sharingOphestra
Sharing and persisting these directories do not always make sense. Make it optional here. Closes #16. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-19internal/app/outcome: apply configured filesystems lateOphestra
This enables configured filesystems to cover system mount points. Closes #8. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-18internal/app/spruntime: emulate pam_systemd typeOphestra
This sets XDG_SESSION_TYPE to the corresponding values specified in pam_systemd(8) according to enablements. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-14test/sandbox: ignore nondeterministic mount pointOphestra
No idea what systemd is doing with this to cause its options to change. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-07hst/config: move container fields from toplevelOphestra
This change also moves pd behaviour to cmd/hakurei, as this does not belong in the hst API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-05internal/app: check nscd socket for path hidingOphestra
This can seriously break things, and exposes extra host attack surface, so include it here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-24test/sandbox: raise timeoutOphestra
The integration vm is being very slow for some reason. This change should reduce spurious timeouts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: create marker in /var/tmpOphestra
This prepares the test suite for private TMPDIR. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox/tool: marker pathname from flagOphestra
Since this is going to be placed in a shared directory, it needs to be unique to the identity. Instead of trying to figure out identity from mountinfo, just have the test script pass hardcoded values. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: check extra writable pathsOphestra
This is not always obvious from mountinfo. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14test/sandbox: bind /var/tmp writableOphestra
This makes it possible to place markers with private tmpdir. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-09-14internal/app: mount /dev/shm earlyOphestra
This avoids covering /dev/shm mounts from hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-27app/seal: leave $DISPLAY as is on host abstractOphestra
This helps work around faulty software that misinterprets unix: DISPLAY string. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26container/initdev: mount tmpfs on shm for ro devOphestra
Programs expect /dev/shm to be a writable tmpfs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst: use hsu userid for share path suffixOphestra
The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented. Closes #7. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-26hst/config: remove data field, rename dir to homeOphestra
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-25hst/config: remove container etc fieldOphestra
This no longer needs special treatment since it can be specified as a generic filesystem entry. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18container: optionally isolate host abstract UNIX domain sockets via landlockClayton Gilmer
2025-08-18test/sandbox: do not discard stderr getting hashOphestra
This is the first hakurei run in the test, if the container outright fails to start this is often where it happens, so throwing away the output is very unhelpful. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-18app: set up acl on X11 socketOphestra
The socket is typically owned by the priv-user, and inaccessible by the target user, so just allowing access to the directory is not enough. This change fixes this oversight and add checks that will also be useful for merging https://git.gensokyo.uk/security/hakurei/pulls/1. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15hst/fs: implement overlay fstypeOphestra
This finally exposes overlay mounts in the high level hakurei API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-15nix: check config via hakureiOphestra
This is unfortunately the only feasible way of doing this in nix. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-03container/ops: mount dev readonlyOphestra
There is usually no good reason to write to /dev. This however doesn't work in internal/app because FilesystemConfig supplied by ContainerConfig might add entries to /dev, so internal/app follows DevWritable with Remount instead. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01app: remount root readonlyOphestra
This does nothing for security, but should help avoid hiding bugs of programs developed in a hakurei container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01nix: remove nscd coverOphestra
This is a pd workaround that does nothing in the nixos module. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01hst/container: mount tmpfs via magic src stringOphestra
There's often good reason to mount tmpfs in the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01container/mount: pass tmpfs flagsOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01app: integrate container autorootOphestra
Doing this instead of mounting directly on / because it's impossible to ensure a parent is available for every path hakurei wants to mount to. This situation is similar to autoetc hence the similar name, however a symlink mirror will not work in this case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-08-01test/sandbox: check pd behaviourOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-26nix: update flake lockOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-09test/sandbox: add arm64 constantsOphestra
Most of these are differences in qemu. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-09test/sandbox: verify seccomp on all test casesOphestra
This change also makes seccomp hashes cross-platform. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-07test/sandbox: guard on testtool tagOphestra
This tool should not show up when building hakurei normally. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-07test/sandbox/seccomp: remove uselibOphestra
This syscall is not wired on all platforms. This test barely does anything anyway and seccomp is covered by the privileged test instrumentation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-07-03treewide: migrate to hakurei.appOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-06-25treewide: rename to hakureiOphestra
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>