Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneRepository ¶
func DeleteTmpDirectory ¶
func DeleteTmpDirectory(path string)
Types ¶
type Controller ¶
type Controller struct { Incoming chan *Job Cancelling chan *Job Quit chan bool QuitFlag bool // contains filtered or unexported fields }
func (*Controller) AddJob ¶
func (c *Controller) AddJob(ri *models.RepositoryInfo) *Job
API to allow users to add jobs to the controller queue. Returns a Job struct containing the identifier for the queued job, as well as the results channel where the output will be sent.
func (*Controller) Initialize ¶
func (c *Controller) Initialize(scanner ScanHandler)
Setup the controller for use
func (*Controller) RemoveJob ¶
func (c *Controller) RemoveJob(job *Job)
API to allow users to cancel jobs that are in the controller queue. When a job is cancelled by the user, the user should no longer perform any additional processing for the job. No further data should be expected from the results channel.
func (*Controller) Run ¶
func (c *Controller) Run()
Starts the controller. It will continue running until a message is received from the Quit channel. Initialize() must be called before calling this function.
func (*Controller) RunOnce ¶
func (c *Controller) RunOnce()
The controller will execute for one loop. Initialize() must be called before calling this function.
func (*Controller) Stop ¶
func (c *Controller) Stop()
Notifies the controller to stop running. This is not guaranteed to be immediate, and pending jobs may still be processed before execution stops.
type JobUpdate ¶
type JobUpdate struct { Status string Findings []*models.FindingsInfo }
type RuleDefinition ¶
type ScanHandler ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) Initialize ¶
type SecretFinder ¶
type SecretFinder struct {
// contains filtered or unexported fields
}
func (*SecretFinder) FindSecrets ¶
func (a *SecretFinder) FindSecrets(basepath string) []*models.FindingsInfo
func (*SecretFinder) Initialize ¶
func (a *SecretFinder) Initialize()
func (*SecretFinder) ScanFile ¶
func (a *SecretFinder) ScanFile(path string) error