Documentation
¶
Overview ¶
Package sensitive holds a process-wide registry of secret values that must never appear in any log line, error message, or stdout output.
Usage:
token := os.Getenv("CLOUDFLARE_API_TOKEN")
sensitive.Register(token) // ← BEFORE token reaches any code path that may log
scrubbed := sensitive.Scrub(message) // applied automatically by the shared Logger
Any value passed to Register is replaced with "***" wherever it appears in strings passed through Scrub. Values shorter than minRedactLen are ignored to avoid scrubbing common short tokens (e.g. account IDs that may legitimately appear in URLs).
Index ¶
- func Clear()
- func Fprint(w io.Writer, a ...any) (int, error)
- func Fprintf(w io.Writer, format string, a ...any) (int, error)
- func Fprintln(w io.Writer, a ...any) (int, error)
- func Print(a ...any) (int, error)
- func Printf(format string, a ...any) (int, error)
- func Println(a ...any) (int, error)
- func Register(values ...string)
- func Scrub(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.