(v any)
| 268 | } |
| 269 | |
| 270 | func 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 | |
| 293 | func isSensitiveConfigKey(key string) bool { |
| 294 | if key == "" { |
no test coverage detected