MCPcopy Create free account
hub / github.com/coder/coder / isSensitiveJSONKey

Function isSensitiveJSONKey

coderd/x/chatd/chatdebug/redaction.go:233–244  ·  view source on GitHub ↗
(key string)

Source from the content-addressed store, hash-verified

231}
232
233func isSensitiveJSONKey(key string) bool {
234 lowerKey := strings.ToLower(key)
235 if _, ok := sensitiveJSONKeyExact[lowerKey]; ok {
236 return true
237 }
238 for _, fragment := range sensitiveJSONKeyFragments {
239 if strings.Contains(lowerKey, fragment) {
240 return true
241 }
242 }
243 return false
244}
245
246func redactJSONValue(value any) (any, bool) {
247 switch typed := value.(type) {

Callers 2

redactJSONValueFunction · 0.85
redactURLFunction · 0.85

Calls 1

ContainsMethod · 0.45

Tested by

no test coverage detected