secrets

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// Custom patterns in addition to the defaults
	CustomPatterns []*regexp.Regexp
	// Entropy threshold for detecting high-entropy strings (likely secrets)
	EntropyThreshold float64
}

Detector represents a lightweight secrets detector

func NewDetector

func NewDetector() *Detector

NewDetector creates a new secrets detector

func (*Detector) AddCustomPattern

func (d *Detector) AddCustomPattern(pattern *regexp.Regexp)

AddCustomPattern adds a custom regex pattern to detect secrets

func (*Detector) Detect

func (d *Detector) Detect(workflow parser.WorkflowFile) []rules.Finding

Detect scans a workflow file for potential secrets

func (*Detector) SetEntropyThreshold

func (d *Detector) SetEntropyThreshold(threshold float64)

SetEntropyThreshold sets the entropy threshold for detecting high-entropy strings

Jump to

Keyboard shortcuts

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