redact

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const RedactedValue = "[REDACTED]"

Variables

This section is empty.

Functions

func Args

func Args(action, subcommand string, args []string) []string

Args applies command-specific redaction to positional arguments.

func ErrorMessage

func ErrorMessage(msg string) string

ErrorMessage scrubs known secret patterns from error strings before telemetry export.

func Flag

func Flag(name, value string) string

Flag redacts a single CLI flag value based on flag name.

func SafeJWTClaimsForLog

func SafeJWTClaimsForLog(claims map[string]interface{}) map[string]interface{}

SafeJWTClaimsForLog returns an allowlisted subset of JWT claims safe for debug logging.

func URL

func URL(rawURL string) string

URL returns a version of rawURL with credentials masked to avoid leaking secrets that may be embedded in RPC or asset URLs. For example, "https://rpc.example.com/v1/my-secret-key" becomes "https://rpc.example.com/v1/***".

Types

This section is empty.

Jump to

Keyboard shortcuts

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