secrets

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

ABOUTME: Secret detection and masking pipeline stage for sync pipeline. ABOUTME: Detects credentials/tokens via regex and replaces with [REDACTED:pattern_name].

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MaskResult

type MaskResult struct {
	Masked      string
	SecretCount int
	Patterns    []string
}

MaskResult holds the output of secret masking: masked text, count, and pattern names.

func MaskSecrets

func MaskSecrets(content string) MaskResult

MaskSecrets applies all secret patterns to the content, replacing matches with [REDACTED:pattern_name]. Returns the masked text, count of secrets found, and a deduplicated list of which pattern names matched.

Jump to

Keyboard shortcuts

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