test/sandbox: check seccomp outcome
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
27
test/sandbox/seccomp.nix
Normal file
27
test/sandbox/seccomp.nix
Normal file
@@ -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
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user