redact

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package redact identifies and masks header values that commonly carry credentials, so they never round-trip back out through API responses, `readproof inspect`, or `readproof resource list` — even if an operator pasted a raw secret instead of using the "${VAR}" environment-reference form the http source adapter resolves at fetch time (see internal/source/http).

Index

Constants

View Source
const Placeholder = "[REDACTED]"

Variables

This section is empty.

Functions

func Headers

func Headers(headers map[string]string) map[string]string

Headers returns a copy of headers with sensitive values replaced by Placeholder. Non-sensitive entries pass through unchanged.

func IsSensitiveHeader

func IsSensitiveHeader(name string) bool

IsSensitiveHeader reports whether a header name commonly carries a credential, by exact well-known name or by substring heuristic (e.g. "X-Api-Key", "X-Auth-Token").

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL