Redaction can lower accidental disclosure in logs and diagnostic output. It provides best-effort results. It does not provide a protective boundary.
- Structured redaction replaces values under configured sensitive property names.
- Header redaction applies the same key rules to header names.
- Text redaction checks known credential patterns and configured key names.
- Literal-secret replacement checks only the values that you provide.
- Safe serialization limits depth and retained values. It maps some complex values to labels.
The package may miss secrets. Text rules may not find unknown formats. They can also redact text that is not secret.
Depth, key, and array limits control traversal. The text limit applies to each text value. These settings do not hide values that redaction rules miss.
The package does not encrypt, store, or control access to data. It does not replace access control, encryption, retention rules, or inspection by your team.
- Redact values before you send them to logs, storage, transport, or a browser.
- Add sensitive property names that your application uses.
- Supply literal secrets when pattern rules do not cover them.
- Examine the output before you share it outside your application.
- Prevent exposure of source values with the controls that your system requires.
- Use fake values in source code, tests, examples, documentation, and issue reports.
Read the API guide for supported rules and limits. Read the specifications for the full behavior contract.