MCPcopy
hub / github.com/openai/plugins / redact_data

Function redact_data

plugins/sentry/skills/sentry/scripts/sentry_api.py:27–40  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

25
26
27def redact_data(value):
28 if isinstance(value, str):
29 return redact_string(value)
30 if isinstance(value, list):
31 return [redact_data(item) for item in value]
32 if isinstance(value, dict):
33 redacted = {}
34 for key, item in value.items():
35 if key.lower() in {"email", "ip", "ip_address"}:
36 redacted[key] = "[REDACTED]"
37 else:
38 redacted[key] = redact_data(item)
39 return redacted
40 return value
41
42
43def next_cursor(link_header):

Callers 1

mainFunction · 0.85

Calls 1

redact_stringFunction · 0.85

Tested by

no test coverage detected