scrubber

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDetectedPatterns

func GetDetectedPatterns(content string) []string

GetDetectedPatterns returns names of all detected sensitive patterns

func HasSensitiveData

func HasSensitiveData(content string) bool

HasSensitiveData checks if the content contains any sensitive patterns

func ScrubDiff

func ScrubDiff(diff string) string

ScrubDiff removes sensitive information from git diff output

func ScrubEnvFile

func ScrubEnvFile(content string) string

ScrubEnvFile specifically handles .env file patterns

func ScrubLines

func ScrubLines(content string) string

ScrubLines removes sensitive information line by line This is useful for more granular control

Types

type SensitivePattern

type SensitivePattern struct {
	Name    string
	Pattern *regexp.Regexp
	Redact  string
}

SensitivePattern represents a regex pattern to detect sensitive data

Jump to

Keyboard shortcuts

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