MCPcopy Create free account
hub / github.com/Hidden-Node/GooseRelayVPN-AndroidClient / redactScriptKeyEntry

Function redactScriptKeyEntry

cmd/client/diagnostics.go:270–291  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

268}
269
270func redactScriptKeyEntry(v any) any {
271 switch x := v.(type) {
272 case string:
273 return redactSecretString(x, "deployment")
274 case map[string]any:
275 out := make(map[string]any, len(x))
276 for k, child := range x {
277 if strings.EqualFold(k, "id") {
278 if s, ok := child.(string); ok {
279 out[k] = redactSecretString(s, "deployment")
280 } else {
281 out[k] = "<redacted deployment>"
282 }
283 continue
284 }
285 out[k] = redactJSONValue(k, child)
286 }
287 return out
288 default:
289 return "<redacted deployment>"
290 }
291}
292
293func isSensitiveConfigKey(key string) bool {
294 if key == "" {

Callers 1

redactJSONValueFunction · 0.85

Calls 2

redactSecretStringFunction · 0.85
redactJSONValueFunction · 0.85

Tested by

no test coverage detected