Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseGitleaksConfig ¶
func ParseGitleaksConfig(rawConfig string) (glc *gitleaksconfig.Config, err error)
ParseGitleaksConfig takes a gitleaks config string and returns a config object
Types ¶
type Backend ¶
type Backend interface { Name() string Scan(resource resource.Resource) ([]*response.Result, error) }
Backend is an interface for a scanner backend leveraged by leaktk
type Gitleaks ¶
type Gitleaks struct {
// contains filtered or unexported fields
}
Gitleaks wraps gitleaks as a scanner backend
func NewGitleaks ¶
NewGitleaks returns a configured gitleaks backend instance
type HTTPClient ¶
HTTPClient provides an interface for working with Go's http client or swapping it out with other types for testing
type Patterns ¶
type Patterns struct {
// contains filtered or unexported fields
}
Patterns acts as an abstraction for fetching different scanner patterns and keeping them up to date and cached
func NewPatterns ¶
func NewPatterns(cfg *config.Patterns, client HTTPClient) *Patterns
NewPatterns returns a configured instance of Patterns
func (*Patterns) Gitleaks ¶
func (p *Patterns) Gitleaks() (*gitleaksconfig.Config, error)
Gitleaks returns a Gitleaks config object if it's able to
func (*Patterns) GitleaksConfigHash ¶ added in v0.0.2
GitleaksConfigHash returns the sha256 hash for the current gitleaks config
type Request ¶
type Request struct { ID string // Thing to scan (e.g. URL, snippet of text, etc) Resource resource.Resource }
Request to the scanner to scan some resource
func (*Request) UnmarshalJSON ¶
UnmarshalJSON sets r to a copy of data
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner holds the config and state for the scanner processes
func NewScanner ¶
NewScanner returns a initialized and listening scanner instance that should be closed when it's no longer needed.