From f7bd6a5a4172dec89a1b86100602163b61b8ff86 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 4 Mar 2025 13:30:16 +0900 Subject: test/sandbox: check seccomp outcome Signed-off-by: Ophestra --- test/sandbox/seccomp.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/sandbox/seccomp.nix (limited to 'test/sandbox/seccomp.nix') diff --git a/test/sandbox/seccomp.nix b/test/sandbox/seccomp.nix new file mode 100644 index 00000000..3cf9b582 --- /dev/null +++ b/test/sandbox/seccomp.nix @@ -0,0 +1,27 @@ +{ + writeText, + buildGoModule, + + version, +}: +let + mainFile = writeText "main.go" '' + package main + + import "git.gensokyo.uk/security/fortify/test/sandbox" + + func main() { sandbox.MustAssertSeccomp() } + ''; +in +buildGoModule { + pname = "check-seccomp"; + inherit version; + + src = ../.; + vendorHash = null; + + preBuild = '' + go mod init git.gensokyo.uk/security/fortify/test >& /dev/null + cp ${mainFile} main.go + ''; +} -- cgit v1.3.1