Documentation
¶
Overview ¶
Package secrets detects (and optionally redacts) likely credentials in session content — API keys, tokens, private keys — so you can check a session before sharing or syncing it. Detection is best-effort and pattern-based: it favours high-signal patterns to keep false positives low, and never phones home.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Redact ¶
Redact replaces every detected secret with a typed placeholder and reports how many were replaced. It is lossy and opt-in. Private-key blocks are replaced only at their header (the body is left, since the header alone signals the secret and rewriting multi-line PEM bodies risks corrupting structure); callers that need full-body redaction should drop the whole value.