aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/assert.go
AgeCommit message (Collapse)Author
2025-11-12test: move package sandbox internalOphestra
This should never be used outside vm tests. 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-14internal/app: mount /dev/shm earlyOphestra
This avoids covering /dev/shm mounts from hst. 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-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-03-30test/sandbox: treat ESRCH as temporary failureOphestra
This is an ugly fix that makes various assumptions guaranteed to hold true in the testing vm. The test package is filtered by the build system so some ugliness is tolerable here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-30test/sandbox: separate check filterOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-28test/sandbox: check seccomp outcomeOphestra
This is as ugly as it is because it has to have CAP_SYS_ADMIN and not be in seccomp mode. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-28test/sandbox/ptrace: dump seccomp bpf programOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27test/sandbox: check environmentOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-27test/sandbox: invoke check program directlyOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-24test/sandbox: check mount table lengthOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-24test/sandbox: fail on mismatched mount entryOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-24test/sandbox: verify outcome via mountinfoOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test/sandbox: warn about misuse in doc commentOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-23test/sandbox: parse full test caseOphestra
This makes declaring multiple tests much cleaner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-21test/sandbox: check type handling host_passthroughOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-13test/sandbox: bypass fieldsOphestra
A field is bypassed if it contains a single null byte. This will never appear in the text format so is safe to use. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-12test/sandbox/mount: work around nondeterminismOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-04test/sandbox: check seccomp outcomeOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-02test/sandbox: assert filesystem jsonOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-03-02test/sandbox/assert: wrap printfOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-02-28test/sandbox: assert mntent jsonOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>