redact

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package redact contains cross-cutting trust-boundary sanitizers.

Index

Constants

View Source
const Replacement = "[REDACTED]"

Variables

This section is empty.

Functions

func RedactJSON

func RedactJSON(raw []byte, secrets ...string) ([]byte, bool)

RedactJSON recursively redacts sensitive field values and credential-like strings. Invalid JSON is rejected so callers cannot accidentally publish a truncated or partially redacted document.

func RedactText

func RedactText(value string, secrets ...string) string

RedactText removes common credentials, credential-bearing URLs, and every caller-supplied secret literal from untrusted text before it crosses a log, event, result, artifact, or protocol error boundary.

Types

This section is empty.

Jump to

Keyboard shortcuts

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