{"modulePath":"github.com/GoCodeAlone/workflow","version":"v0.82.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package scanner\n\nPackage scanner provides a built-in engine plugin that registers the security.scanner module type, implementing SecurityScannerProvider. It supports mock mode for testing. CLI mode (shelling out to semgrep, trivy, grype) is not yet implemented.\n\n## Types\n\n```go\ntype Plugin struct {\n\tplugin.BaseEnginePlugin\n}\n```\nPlugin registers the security.scanner module type.\n\n```go\nfunc New() *Plugin\n```\nNew creates a new scanner plugin.\n\n```go\nfunc (p *Plugin) Capabilities() []capability.Contract\n```\nCapabilities returns the plugin's capability contracts.\n\n```go\nfunc (p *Plugin) ModuleFactories() map[string]plugin.ModuleFactory\n```\nModuleFactories returns the security.scanner module factory.\n\n```go\nfunc (p *Plugin) ModuleSchemas() []*schema.ModuleSchema\n```\nModuleSchemas returns schemas for the security.scanner module.\n\n```go\ntype ScannerModule struct {\n\t// contains filtered or unexported fields\n}\n```\nScannerModule implements SecurityScannerProvider and registers itself in the service registry so that scan steps can find it.\n\n```go\nfunc NewScannerModule(name string, cfg map[string]any) (*ScannerModule, error)\n```\nNewScannerModule creates a ScannerModule from config.\n\n```go\nfunc (m *ScannerModule) Init(app modular.Application) error\n```\nInit registers the module as a SecurityScannerProvider in the service registry. Only one security.scanner module may be loaded at a time; this is intentional — the engine uses a single provider under the \"security-scanner\" service key.\n\n```go\nfunc (m *ScannerModule) Name() string\n```\nName returns the module name.\n\n```go\nfunc (m *ScannerModule) ScanContainer(_ context.Context, opts module.ContainerScanOpts) (*module.ScanResult, error)\n```\nScanContainer performs a container image scan. In mock mode, returns preconfigured findings.\n\n```go\nfunc (m *ScannerModule) ScanDeps(_ context.Context, opts module.DepsScanOpts) (*module.ScanResult, error)\n```\nScanDeps performs a dependency vulnerability scan. In mock mode, returns preconfigured findings.\n\n```go\nfunc (m *ScannerModule) ScanSAST(_ context.Context, opts module.SASTScanOpts) (*module.ScanResult, error)\n```\nScanSAST performs a SAST scan. In mock mode, returns preconfigured findings.\n\n```go\nfunc (m *ScannerModule) Start(_ context.Context) error\n```\nStart is a no-op.\n\n```go\nfunc (m *ScannerModule) Stop(_ context.Context) error\n```\nStop is a no-op.\n\n","path":"github.com/GoCodeAlone/workflow/plugins/scanner","name":"scanner","synopsis":"Package scanner provides a built-in engine plugin that registers the security.scanner module type, implementing SecurityScannerProvider.","isRedistributable":true}
