Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FsScanner ¶
type FsScanner struct { RulesPath string Root string Result []model.Leak Debug bool ProgressBar *progressbar.ProgressBar RuleSet *model.RuleSet Output ReportInterface }
FsScanner stores configuration for scanning a local directory in the fs
func NewFsScanner ¶
func NewFsScanner(root, rulespath string, output ReportInterface, debug bool) *FsScanner
NewFsScanner creates a new FsScanner
type GitScanner ¶
type GitScanner struct { // Where to store local copy of the repo Cache string // Path to the rule definition file // If set to "" automatically used default resources.yaml embedded by packr RulesPath string Repo *model.Repo RuleSet *model.RuleSet Result []model.Leak // Whether or not to display progressbar (mainly for testing) Debug bool ProgressBar *progressbar.ProgressBar // Output writer interface Output ReportInterface }
GitScanner stores configuration for scanning a git repository
func NewGitScanner ¶
func NewGitScanner(source, cache, rulespath string, output ReportInterface, debug bool) *GitScanner
NewGitScanner creates a new git Scanner
func (*GitScanner) Scan ¶
func (g *GitScanner) Scan(concurrent int)
Scan iterates over each commits and use defined rules to analyse for possible leaks
func (GitScanner) Type ¶
func (g GitScanner) Type() string
Type returns the string type of the scanner ("git")
type HTMLReport ¶
HTMLReport implements the ReportInterface to write html reports
func (HTMLReport) Write ¶
func (h HTMLReport) Write(s Scanner)
type ReportInterface ¶
type ReportInterface interface {
Write(Scanner)
}
ReportInterface modules writer behaviour for different reports
type YamlReport ¶
type YamlReport struct {
Outfile string
}
YamlReport implements the ReportInterface to write yaml reports
func (YamlReport) Write ¶
func (y YamlReport) Write(s Scanner)
Click to show internal directories.
Click to hide internal directories.