Documentation
¶
Overview ¶
Package logreduct masks registered secrets in log text and slog attributes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redactor ¶
type Redactor struct {
// contains filtered or unexported fields
}
Redactor tracks secrets and their reference counts for log masking. The zero value is ready to use. A Redactor is safe for concurrent use and must not be copied after first use.
var Default Redactor
Default is a shared redactor for process-wide logging. Handlers using its ReplaceAttr method see secrets registered after the handler was configured.
func (*Redactor) AddJIT ¶
AddJIT registers an encoded GitHub Actions JIT configuration and any decoded content and credential fields. Pass the returned values to Release after use.
func (*Redactor) Redact ¶
Redact replaces registered secrets with "***", merging overlapping matches.