From 9131b0004e7c640cc028179e1d049a4c62210d94 Mon Sep 17 00:00:00 2001 From: James O'Doherty Date: Fri, 22 May 2026 10:46:02 -0400 Subject: Security hardening: prevent shell injection and null-byte crashes, implement 8-bit clean argument fuzzing and portable E2E binary discovery --- tests/e2e/e2e_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/e2e/e2e_test.go') diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 4339a8b..fb763b3 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -20,10 +20,10 @@ func TestNetworkIsolation(t *testing.T) { t.Fatalf("Failed to get cwd: %v", err) } root := filepath.Join(cwd, "..", "..") - + // 2. Build the project to ensure we have a fresh binary buildCmd := exec.Command("bash", "-c", fmt.Sprintf( - "cd %s && gcc -static -O2 internal/namespace/launcher_src/launcher.c -o internal/namespace/launcher.bin && export CGO_ENABLED=1 && go build -o wg-wrap cmd/wg-wrap/main.go", + "cd %s && gcc -static -O2 internal/namespace/launcher_src/launcher.c -o internal/namespace/launcher.bin && export CGO_ENABLED=1 && go build -o wg-wrap cmd/wg-wrap/main.go", root)) if err := buildCmd.Run(); err != nil { t.Fatalf("Failed to build project for E2E test: %v", err) @@ -43,7 +43,7 @@ func TestNetworkIsolation(t *testing.T) { } // Cleanup - os.Remove(binaryPath) + _ = os.Remove(binaryPath) } func TestDNSLeakage(t *testing.T) { -- cgit v1.2.3