Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/commands/token_kubeconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion internal/mcp/mcp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pkg/k8s/token_passthrough_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading