16 lines
540 B
Go
16 lines
540 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestSecretControlPlaneDefaultsUseDedicatedProtectedRoot(t *testing.T) {
|
|
if defaultRoot != "/run/control-plane-secrets" || defaultRuntimeUID <= 0 || defaultRuntimeGID <= 0 {
|
|
t.Fatal("unsafe control-plane defaults")
|
|
}
|
|
}
|
|
|
|
func TestRotationReasonsAreBoundedAndNeverArbitraryDiagnosticText(t *testing.T) {
|
|
if !validRotationReason("owner-requested-rotation") || !validRotationReason("exposure-detected") || validRotationReason("Bearer secret-value") {
|
|
t.Fatal("unsafe rotation reason validation")
|
|
}
|
|
}
|