utils

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphaNumeric

func AlphaNumeric(size string) string

func AlphaNumericExtended

func AlphaNumericExtended(size string) string

func AlphaNumericExtendedLong

func AlphaNumericExtendedLong(size string) string

func AlphaNumericExtendedShort

func AlphaNumericExtendedShort(size string) string

func BearerGetValidationExpr added in v1.6.0

func BearerGetValidationExpr(url string, successCheck string) string

func GenerateSampleSecret

func GenerateSampleSecret(identifier string, secret string) string

func GenerateSampleSecrets

func GenerateSampleSecrets(identifier string, secret string) []string

See: https://github.com/gitleaks/gitleaks/issues/1222

func GenerateSemiGenericRegex

func GenerateSemiGenericRegex(identifiers []string, secretRegex string, isCaseInsensitive bool) *regexp.Regexp

func GenerateUniqueTokenRegex

func GenerateUniqueTokenRegex(secretRegex string, isCaseInsensitive bool) *regexp.Regexp

func Hex

func Hex(size string) string

func Hex8_4_4_4_12

func Hex8_4_4_4_12() string

func MergeRegexps

func MergeRegexps(regexps ...*regexp.Regexp) *regexp.Regexp

func MinEntropy added in v1.5.0

func MinEntropy(threshold float64) string

func Numeric

func Numeric(size string) string

func Ptr added in v1.1.2

func Ptr[T any](v T) *T

func Validate

func Validate(rule config.Rule, truePositives []string, falsePositives []string) *config.Rule

func ValidateWithPaths

func ValidateWithPaths(rule config.Rule, truePositives map[string]string, falsePositives map[string]string) *config.Rule

Types

This section is empty.

Jump to

Keyboard shortcuts

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