MCPcopy Create free account
hub / github.com/auth0/auth0-cli / sanitizeAgentName

Function sanitizeAgentName

internal/cli/agent_detection.go:228–238  ·  view source on GitHub ↗

sanitizeAgentName restricts AUTH0_CLI_CLIENT to the allow-list; unknown values are prefixed with "client-".

(raw string)

Source from the content-addressed store, hash-verified

226
227// sanitizeAgentName restricts AUTH0_CLI_CLIENT to the allow-list; unknown values are prefixed with "client-".
228func sanitizeAgentName(raw string) string {
229 lower := strings.ToLower(strings.TrimSpace(raw))
230
231 for _, name := range knownAgentClients {
232 if lower == name {
233 return name
234 }
235 }
236
237 return "client-" + lower
238}

Callers 2

detectAgentWithEnvFunction · 0.85

Calls

no outgoing calls

Tested by 1