MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / redact_secrets

Function redact_secrets

core/sessions.py:25–31  ·  view source on GitHub ↗

Mask potential secrets in text before saving to disk.

(text: str)

Source from the content-addressed store, hash-verified

23]
24
25def redact_secrets(text: str) -> str:
26 """Mask potential secrets in text before saving to disk."""
27 if not isinstance(text, str):
28 return text
29 for pattern, replacement in _SECRET_PATTERNS:
30 text = pattern.sub(replacement, text)
31 return text
32
33def _session_path(project_dir: str = None) -> Path:
34 """Get session file path for a project directory."""

Callers 1

save_sessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected