Skip to main content

Module redact

Module redact 

Source
Expand description

Mandatory secret redaction at durable runtime boundaries.

This module is the single implementation used by both the CLI and the SQLite repositories. Values remain unmodified while executing; cloned arguments, outcomes, labels, and URLs are scrubbed immediately before they cross a persistence or display boundary.

Functionsยง

redact_json
Redact every string leaf of a cloned structured payload in place.
redact_json_text
Redact a serialized JSON payload. Malformed input is treated as ordinary text and still receives shape-based scrubbing; persistence never fails open.
redact_secrets
Replace credential-shaped substrings while preserving surrounding context.
sanitize_url_for_display
Sanitize a URL for display or storage without changing the transport URL.