Go/Vitest coverage for bof_execute, hollow AMSI limits, cloudflared stub policy, KEV n/a, mesh P2P zero peers, and non-Windows GPU/camera stubs. Skip GPU subprocess on non-Windows; document cloudflared external connector path.
28 lines
647 B
Go
28 lines
647 B
Go
package deploy
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestRunHollowedUnavailableWithoutTag(t *testing.T) {
|
|
err := RunHollowed("C:\\Windows\\System32\\notepad.exe", []byte{0})
|
|
if err == nil {
|
|
t.Fatal("expected error on default build")
|
|
}
|
|
msg := err.Error()
|
|
if !strings.Contains(msg, "hollowing") && !strings.Contains(msg, "not available") {
|
|
t.Fatalf("unexpected error: %q", msg)
|
|
}
|
|
}
|
|
|
|
func TestHollowDesignLimitsDocumented(t *testing.T) {
|
|
if !HollowRelocationsImplemented {
|
|
t.Fatal("relocation patching must remain implemented (H12)")
|
|
}
|
|
if HollowAMSIBypassImplemented {
|
|
t.Fatal("AMSI/ETW bypass must stay disabled by design")
|
|
}
|
|
}
|
|
|