Documentation ¶
Index ¶
- type AuditTime
- type CloneTime
- type Leak
- type Manager
- func (manager *Manager) DebugOutput()
- func (manager *Manager) GetLeaks() []Leak
- func (manager *Manager) GetMetadata() Metadata
- func (manager *Manager) IncrementCommits(i int)
- func (manager *Manager) RecordTime(t interface{})
- func (manager *Manager) Report() error
- func (manager *Manager) SendLeaks(l Leak)
- type Metadata
- type PatchTime
- type RegexTime
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Leak ¶
type Leak struct { Line string `json:"line"` Offender string `json:"offender"` Commit string `json:"commit"` Repo string `json:"repo"` Rule string `json:"rule"` Message string `json:"commitMessage"` Author string `json:"author"` Email string `json:"email"` File string `json:"file"` Date time.Time `json:"date"` Tags string `json:"tags"` // contains filtered or unexported fields }
Leak is a struct that contains information about some line of code that contains sensitive information as determined by the rules set in a gitleaks config
type Manager ¶
type Manager struct { Opts options.Options Config config.Config CloneOptions *git.CloneOptions CloneDir string // contains filtered or unexported fields }
Manager is a struct containing options and configs as well CloneOptions and CloneDir. This struct is passed into each NewRepo so we are not passing around the manager in func params.
func NewManager ¶
NewManager accepts options and returns a manager struct. The manager is a container for gitleaks configurations, options and channel receivers.
func (*Manager) DebugOutput ¶
func (manager *Manager) DebugOutput()
DebugOutput logs metadata and other messages that occurred during a gitleaks audit
func (*Manager) GetMetadata ¶
GetMetadata returns the metadata. TODO this may not need to be private
func (*Manager) IncrementCommits ¶
IncrementCommits increments total commits during an audit by i.
func (*Manager) RecordTime ¶
func (manager *Manager) RecordTime(t interface{})
RecordTime accepts an interface and sends it to the manager's time channel
type Metadata ¶
type Metadata struct { RegexTime map[string]int64 Commits int AuditTime int64 // contains filtered or unexported fields }
Metadata is a struct used to communicate metadata about an audit like timings and total commit counts.
type PatchTime ¶
type PatchTime int64
PatchTime is a type used to determine total patch time during an audit