Documentation ¶
Index ¶
- type ArtifactLocation
- type CloneTime
- type Driver
- type FullDescription
- type Leak
- type Locations
- 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 Message
- type Metadata
- type PatchTime
- type PhysicalLocation
- type RegexTime
- type Region
- type ResultProperties
- type Results
- type Rules
- type Runs
- type Sarif
- type ScanTime
- type ShortDescription
- type Snippet
- type Tool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactLocation ¶
type ArtifactLocation struct {
URI string `json:"uri"`
}
ArtifactLocation ...
type Driver ¶
type Driver struct { Name string `json:"name"` SemanticVersion string `json:"semanticVersion"` Rules []Rules `json:"rules"` }
Driver ...
type FullDescription ¶
type FullDescription struct {
Text string `json:"text"`
}
FullDescription ...
type Leak ¶
type Leak struct { Line string `json:"line"` LineNumber int `json:"lineNumber"` 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"` Operation string `json:"operation"` // 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 Locations ¶
type Locations struct {
PhysicalLocation PhysicalLocation `json:"physicalLocation"`
}
Locations ...
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 scan
func (*Manager) GetMetadata ¶
GetMetadata returns the metadata. TODO this may not need to be private
func (*Manager) IncrementCommits ¶
IncrementCommits increments total commits during an scan 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 ScanTime int64 // contains filtered or unexported fields }
Metadata is a struct used to communicate metadata about an scan like timings and total commit counts.
type PatchTime ¶
type PatchTime int64
PatchTime is a type used to determine total patch time during an scan
type PhysicalLocation ¶
type PhysicalLocation struct { ArtifactLocation ArtifactLocation `json:"artifactLocation"` Region Region `json:"region"` }
PhysicalLocation ...
type RegexTime ¶
RegexTime is a type used to determine the time each rules' regex takes. This is especially useful if you notice that gitleaks is taking a long time. You can use --debug to see the output of the regexTime so you can determine which regex is not performing well.
type ResultProperties ¶
type ResultProperties struct { Commit string `json:"commit"` Offender string `json:"offender"` Date time.Time `json:"date"` Author string `json:"author"` Email string `json:"email"` CommitMessage string `json:"commitMessage"` Operation string `json:"gitOperation"` Repo string `json:"repo"` }
ResultProperties ...
type Results ¶
type Results struct { Message Message `json:"message"` Properties ResultProperties `json:"properties"` Locations []Locations `json:"locations"` }
Results ...
type Sarif ¶
type Sarif struct { Schema string `json:"$schema"` Version string `json:"version"` Runs []Runs `json:"runs"` }
Sarif ...
type ShortDescription ¶
type ShortDescription struct {
Text string `json:"text"`
}
ShortDescription ...