diff --git a/internal/commands/token_kubeconfig_test.go b/internal/commands/token_kubeconfig_test.go index 899d0b7..062c1ec 100644 --- a/internal/commands/token_kubeconfig_test.go +++ b/internal/commands/token_kubeconfig_test.go @@ -21,7 +21,7 @@ import ( clientcmdapi "k8s.io/client-go/tools/clientcmd/api" ) -const testToken = "eyJhbGciOiJSUzI1NiJ9.passthrough-test-token.signature" +const testToken = "test-passthrough-token-not-a-credential" var testCAData = []byte("-----BEGIN CERTIFICATE-----\nnot-a-real-ca\n-----END CERTIFICATE-----\n") diff --git a/internal/mcp/mcp_test.go b/internal/mcp/mcp_test.go index d7b2539..e546043 100644 --- a/internal/mcp/mcp_test.go +++ b/internal/mcp/mcp_test.go @@ -278,7 +278,7 @@ func TestToolMiddleware_MarksSpanOkOnSuccess(t *testing.T) { // error that quotes a credential (a command line with --token, a bearer // header) must not put it in the span status or the recorded exception. func TestToolMiddleware_RedactsCredentialsOnSpan(t *testing.T) { - const secret = "eyJhbGciOiJSUzI1NiJ9.span-secret.sig" + const secret = "test-span-secret-not-a-credential" exp := tracetest.NewInMemoryExporter() tp := sdktrace.NewTracerProvider(sdktrace.WithSyncer(exp)) prev := otel.GetTracerProvider() diff --git a/pkg/k8s/token_passthrough_test.go b/pkg/k8s/token_passthrough_test.go index 4db8bfc..bb7f715 100644 --- a/pkg/k8s/token_passthrough_test.go +++ b/pkg/k8s/token_passthrough_test.go @@ -137,7 +137,7 @@ func assertTokenOnlyInKubeconfig(t *testing.T, args []string, seen *passthroughK // TestBearerTokenNotInFailedResult covers the reported leak: a failing kubectl // call's tool result must not contain the caller's token. func TestBearerTokenNotInFailedResult(t *testing.T) { - const token = "eyJhbGciOiJSUzI1NiJ9.leak-check-token.sig" + const token = "test-kubectl-token-not-a-credential" mock := cmd.NewMockShellExecutor() mock.AddPartialMatcherString("kubectl", []string{"get", "secrets"}, `Error from server (Forbidden): secrets is forbidden`, assert.AnError) ctx, seen := withPassthroughKubeconfig(t, context.Background(), mock)