Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Trufflehog ¶
type Trufflehog struct {
Path string `json:"path"` // binary path
Concurrency int `json:"concurrency"` // trufflehog concurreny to be used for scanning
Workers int `json:"workers"` // golang concurrency workers
OnlyVerified bool `json:"only_verified"` // only verified flag from trufflehog
Timeout int `json:"timeout"` // kills trufflehog command execution after x seconds
// Github authentication
GithubToken string `json:"-"` // github token for scanning private repos
GithubUsername string `json:"-"` // github username for auth while scanning private repos
// for storing commit hash states
CommitHashStateMap sync.Map `json:"-"`
// For Processing
DataIgnored []map[string]interface{} `json:"ignored_secrets"`
DataVerified []map[string]interface{} `json:"verified_secrets"`
DataUnverified []map[string]interface{} `json:"unverified_secrets"`
// contains filtered or unexported fields
}
func NewTrufflehog ¶
func NewTrufflehog(path string, workers, batchSize, concurrency, timeout int, onlyVerified bool, githubUsername, githubToken string) *Trufflehog
func (*Trufflehog) AddJobs ¶
func (th *Trufflehog) AddJobs(repos []github.Repo)
AddJobs sends repositories to the jobs channel.
func (*Trufflehog) CloseChannels ¶
func (th *Trufflehog) CloseChannels()
func (*Trufflehog) InitChannels ¶
func (th *Trufflehog) InitChannels(bufferSize int)
func (*Trufflehog) RunWorkers ¶
func (th *Trufflehog) RunWorkers()
Click to show internal directories.
Click to hide internal directories.