Documentation ¶
Index ¶
- type EarlybirdCfg
- func (eb *EarlybirdCfg) ConfigInit()
- func (eb *EarlybirdCfg) FileContext() (fileContext file.Context, err error)
- func (eb *EarlybirdCfg) GetRuleModulesMap() (err error)
- func (eb *EarlybirdCfg) GitClone(ptr PTRGitConfig)
- func (eb *EarlybirdCfg) LoadModuleConfig(moduleConfigFilePath string)
- func (eb *EarlybirdCfg) Scan()
- func (eb *EarlybirdCfg) StartHTTP(ptr PTRHTTPConfig)
- func (eb *EarlybirdCfg) WriteResults(start time.Time, HitChannel chan scan.Hit, fileContext file.Context)
- type EarlybirdCore
- type PTRGitConfig
- type PTRHTTPConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EarlybirdCfg ¶
type EarlybirdCfg struct {
Config cfgReader.EarlybirdConfig
}
EarlybirdCfg is the global Earlybird configuration
func (*EarlybirdCfg) ConfigInit ¶
func (eb *EarlybirdCfg) ConfigInit()
ConfigInit loads in the earlybird configuration and CLI flags
func (*EarlybirdCfg) FileContext ¶
func (eb *EarlybirdCfg) FileContext() (fileContext file.Context, err error)
FileContext provides an inclusive file system context of our scan
func (*EarlybirdCfg) GetRuleModulesMap ¶
func (eb *EarlybirdCfg) GetRuleModulesMap() (err error)
GetRuleModulesMap walks the `rules` directory and creates a hash map of module name to the filename for example { content: 'content.json', ccnumber: 'ccnumber.json' }, and generates a list of the available modules in the `rules` directory
func (*EarlybirdCfg) GitClone ¶
func (eb *EarlybirdCfg) GitClone(ptr PTRGitConfig)
GitClone clones git repositories into a temporary directory
func (*EarlybirdCfg) LoadModuleConfig ¶
func (eb *EarlybirdCfg) LoadModuleConfig(moduleConfigFilePath string)
Load module config if user has passed a config file for individual modules with -module-config-file flag
func (*EarlybirdCfg) Scan ¶
func (eb *EarlybirdCfg) Scan()
Scan Runs the scan by kicking off the different modules as go routines
func (*EarlybirdCfg) StartHTTP ¶
func (eb *EarlybirdCfg) StartHTTP(ptr PTRHTTPConfig)
StartHTTP spins up the Earlybird REST API server
func (*EarlybirdCfg) WriteResults ¶
func (eb *EarlybirdCfg) WriteResults(start time.Time, HitChannel chan scan.Hit, fileContext file.Context)
WriteResults reads hits from the channel to the console or target file
type EarlybirdCore ¶
type EarlybirdCore interface { ConfigInit() cfgReader.EarlybirdConfig StartHTTP() Scan() }
EarlybirdCore is the main interface for interacting with Earlybird as a package
type PTRGitConfig ¶
PTRGitConfig is the configuration definition for Earlybird git scans