Documentation
¶
Overview ¶
Package redact removes secrets from event payloads and bounds their size.
It runs twice: in the client hook before an event touches the local spool, and again on the server at ingest (defence in depth). Rules are deliberately conservative pattern matches; they reduce exposure, they do not guarantee it.
Index ¶
Constants ¶
const Placeholder = "[REDACTED]"
Placeholder replaces every redacted value.
Variables ¶
This section is empty.
Functions ¶
func Bound ¶
Bound truncates every string in v to maxString bytes, then shrinks the limit until the encoded value fits in maxTotal bytes. It also strips inline data: URIs (screenshots), which are large and useless for text retrieval.
func JSON ¶
JSON redacts a JSON document. Invalid JSON is redacted as plain text and wrapped so the result is always valid JSON.
func SensitiveKey ¶
SensitiveKey reports whether a JSON object key names a credential.
func SensitivePath ¶
SensitivePath reports whether a file path looks like a secret store whose contents must never be captured (.env, private keys, cloud credentials…).
Types ¶
This section is empty.