Expand description
Header-name redaction list applied to network.json by default (and to
any tool-originated log line). Per design.md §"Secrets are redacted",
credential-bearing headers are replaced with "[redacted]" unless the
caller passes --network-redact off.
Server response bodies pass through unmodified — redaction is for tool-captured metadata only.
Constants§
- ALWAYS_
REDACTED - Header names that are always redacted (case-insensitive match).
- REDACTED_
SUFFIXES - Header-name suffixes that trigger redaction (case-insensitive match
against the full header). Catches
x-api-token,x-csrf-token,x-shared-secret, etc. - REDACTED_
VALUE - Sentinel string written in place of redacted values.
Functions§
- redact_
userinfo_ passwords - Mask the password component of every
scheme://user:pass@hostuserinfo found in arbitrary text, leaving the rest byte-for-byte intact. - should_
redact - Returns true if
header_nameshould be redacted under the default policy. Case-insensitive.