Documentation
¶
Overview ¶
Package sysdig provides a source implementation to integrate with Sysdig Secure. It queries the SysQL API to fetch vulnerability data for container images and pushes results through IBDM's standard pipeline. It also accepts webhook notifications from Sysdig pipeline scans, fetching full vulnerability results from the Sysdig Vulnerability API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrMissingEnvVariable reports missing mandatory environment variables. ErrMissingEnvVariable = errors.New("missing environment variable") // ErrInvalidEnvVariable reports malformed environment variable values. ErrInvalidEnvVariable = errors.New("invalid environment value") )
var ( // ErrSysdigSource wraps all errors originating from the Sysdig source. ErrSysdigSource = errors.New("sysdig source") )
Functions ¶
This section is empty.
Types ¶
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
Source implements source.SyncableSource and source.WebhookSource for Sysdig Secure. It queries the SysQL API to fetch vulnerability data and pushes results through the IBDM pipeline. It also accepts webhook notifications from Sysdig pipeline scans.
func NewSource ¶
NewSource constructs a Source by reading its configuration from environment variables and initialising the underlying HTTP client. It returns ErrSysdigSource if the configuration is invalid.
func (*Source) GetWebhook ¶ added in v0.6.0
func (s *Source) GetWebhook(ctx context.Context, typesToStream map[string]source.Extra, results chan<- source.Data) (source.Webhook, error)
GetWebhook implements source.WebhookSource. It validates the webhook configuration and returns a source.Webhook that parses Sysdig pipeline failure notifications and dispatches events to the processor registry.
func (*Source) StartSyncProcess ¶
func (s *Source) StartSyncProcess(ctx context.Context, typesToSync map[string]source.Extra, results chan<- source.Data) error
StartSyncProcess performs a full synchronisation of the requested resource types by querying the Sysdig SysQL API and sending results to results. Only known data types are processed; unknown types are skipped with a debug log message.