Help us shape the future of Go! Take the 2026 Go Developer Survey

redact

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package redact scrubs secret-shaped values from text seamark stores or displays: audited command lines (the gate's opt-in raw log), mined review-comment bodies, and fix-commit patches. It is best-effort pattern scrubbing, not a guarantee — but a credential a reviewer quoted once must not be re-broadcast into agent context on every edit, which is exactly what an unredacted finding does.

A leaf package: the gate and the miners (reviews, fixes) must scrub identically, and none of them may import another for it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Secrets

func Secrets(s string) string

Secrets scrubs known secret-bearing patterns from s.

func SecretsExcept added in v0.8.0

func SecretsExcept(s string, keep func(match string) bool) string

SecretsExcept scrubs s like Secrets, but it keeps each match for which keep returns true. A display of a command line keeps a value that holds shell syntax. That value is code that runs, and a redaction would hide it from the person who confirms the command.

Types

This section is empty.

Jump to

Keyboard shortcuts

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