Secure messenger with TLS identities, scoped OpenBao secrets and worker compromise experiments

This commit is contained in:
2026-12-02 17:29:35 +03:00
parent 20afc2c790
commit 047cef4c7f
128 changed files with 10569 additions and 49 deletions
@@ -0,0 +1,23 @@
package messenger
import (
"context"
"errors"
"os/exec"
"testing"
)
func TestTransformFailureClassification(t *testing.T) {
for _, c := range []struct {
command string
invalid bool
}{{"exit 65", true}, {"exit 2", false}, {"kill -KILL $$", false}} {
e := exec.Command("sh", "-c", c.command).Run()
if errors.Is(classifyTransformFailure(nil, e), ErrInvalidImage) != c.invalid {
t.Fatalf("misclassified encoder termination %q", c.command)
}
}
if !errors.Is(classifyTransformFailure(context.DeadlineExceeded, nil), context.DeadlineExceeded) {
t.Fatal("deadline lost")
}
}