Documentation
¶
Index ¶
- Constants
- Variables
- func GetRulesCommand(engineConfig *EngineConfig) *cobra.Command
- type DetectorConfig
- type Engine
- func (e *Engine) DetectFile(ctx context.Context, item plugins.ISourceItem, ...) error
- func (e *Engine) DetectFragment(item plugins.ISourceItem, secretsChannel chan *secrets.Secret, ...) error
- func (e *Engine) GetCvssScoreWithoutValidationCh() chan *secrets.Secret
- func (e *Engine) GetDetectorWorkerPool() workerpool.Pool
- func (e *Engine) GetErrorsCh() chan error
- func (e *Engine) GetPluginChannels() plugins.PluginChannels
- func (e *Engine) GetReport() reporting.IReport
- func (e *Engine) GetSecretsExtrasCh() chan *secrets.Secret
- func (e *Engine) GetValidationCh() chan *secrets.Secret
- func (e *Engine) Scan(pluginName string)
- func (e *Engine) SetPluginChannels(pluginChannels plugins.PluginChannels)
- func (e *Engine) Shutdown() error
- func (e *Engine) Wait()
- type EngineConfig
- type EngineOption
- type IEngine
- type IScorer
Constants ¶
View Source
const (
CxFileEndMarker = ";cx-file-end"
)
Variables ¶
View Source
var ( ErrNoRulesSelected = fmt.Errorf("no rules were selected") ErrFailedToCompileRegexRule = fmt.Errorf("failed to compile regex rule") )
Functions ¶
func GetRulesCommand ¶
func GetRulesCommand(engineConfig *EngineConfig) *cobra.Command
Types ¶
type DetectorConfig ¶ added in v4.3.0
type Engine ¶
type Engine struct {
Report reporting.IReport
ScanConfig resources.ScanConfig
// contains filtered or unexported fields
}
func (*Engine) DetectFile ¶
func (e *Engine) DetectFile(ctx context.Context, item plugins.ISourceItem, secretsChannel chan *secrets.Secret) error
DetectFile reads the given file and detects secrets in it
func (*Engine) DetectFragment ¶
func (e *Engine) DetectFragment(item plugins.ISourceItem, secretsChannel chan *secrets.Secret, pluginName string) error
DetectFragment detects secrets in the given fragment
func (*Engine) GetCvssScoreWithoutValidationCh ¶ added in v4.3.0
func (*Engine) GetDetectorWorkerPool ¶ added in v4.3.0
func (e *Engine) GetDetectorWorkerPool() workerpool.Pool
func (*Engine) GetErrorsCh ¶ added in v4.3.0
func (*Engine) GetPluginChannels ¶ added in v4.3.0
func (e *Engine) GetPluginChannels() plugins.PluginChannels
func (*Engine) GetSecretsExtrasCh ¶ added in v4.3.0
func (*Engine) GetValidationCh ¶ added in v4.3.0
func (*Engine) SetPluginChannels ¶ added in v4.3.0
func (e *Engine) SetPluginChannels(pluginChannels plugins.PluginChannels)
type EngineConfig ¶
type EngineOption ¶ added in v4.3.0
type EngineOption func(*Engine)
func WithPluginChannels ¶ added in v4.3.0
func WithPluginChannels(pluginChannels plugins.PluginChannels) EngineOption
type IEngine ¶
type IEngine interface {
DetectFragment(item plugins.ISourceItem, secretsChannel chan *secrets.Secret, pluginName string) error
DetectFile(ctx context.Context, item plugins.ISourceItem, secretsChannel chan *secrets.Secret) error
GetReport() reporting.IReport
Scan(pluginName string)
Wait()
GetPluginChannels() plugins.PluginChannels
SetPluginChannels(pluginChannels plugins.PluginChannels)
GetErrorsCh() chan error
Shutdown() error
}
func Init ¶
func Init(engineConfig *EngineConfig, opts ...EngineOption) (IEngine, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package chunk is a generated GoMock package.
|
Package chunk is a generated GoMock package. |
|
Package semaphore is a generated GoMock package.
|
Package semaphore is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.