trufflehog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 10 Imported by: 0

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()

func (*Trufflehog) ScanRepo

func (t *Trufflehog) ScanRepo(repo github.Repo) error

Jump to

Keyboard shortcuts

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