(key string)
| 231 | } |
| 232 | |
| 233 | func 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 | |
| 246 | func redactJSONValue(value any) (any, bool) { |
| 247 | switch typed := value.(type) { |
no test coverage detected