Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventFilter ¶
type EventFilter struct {
EventTypes []EventType `json:"event_types,omitempty"`
MinSeverity Severity `json:"min_severity,omitempty"`
Sources []string `json:"sources,omitempty"`
ThreatTypes []string `json:"threat_types,omitempty"`
PackageNames []string `json:"package_names,omitempty"`
}
EventFilter defines criteria for filtering events
type EventMetadata ¶
type EventMetadata struct {
DetectionMethod string `json:"detection_method"`
Tags []string `json:"tags,omitempty"`
CustomFields map[string]string `json:"custom_fields,omitempty"`
CorrelationID string `json:"correlation_id,omitempty"`
}
EventMetadata contains additional metadata about the event
type EventSubscriber ¶
type EventSubscriber interface {
Handle(ctx context.Context, event *SecurityEvent) error
GetID() string
}
EventSubscriber defines the interface for event subscribers
type PackageInfo ¶
type PackageInfo struct {
Name string `json:"name"`
Version string `json:"version"`
Registry string `json:"registry"`
Hash string `json:"hash,omitempty"`
Path string `json:"path,omitempty"`
}
PackageInfo contains information about the package involved in the event
type SecurityEvent ¶
type SecurityEvent struct {
ID string `json:"id"`
Timestamp time.Time `json:"timestamp"`
Type EventType `json:"type"`
Severity Severity `json:"severity"`
Source string `json:"source"`
Package PackageInfo `json:"package"`
Threat ThreatInfo `json:"threat"`
Metadata EventMetadata `json:"metadata"`
Context map[string]string `json:"context,omitempty"`
}
SecurityEvent represents a security event in the system
func (*SecurityEvent) MatchesFilter ¶
func (e *SecurityEvent) MatchesFilter(filter *EventFilter) bool
MatchesFilter checks if an event matches the given filter criteria
type ThreatInfo ¶
type ThreatInfo struct {
Type string `json:"type"`
Confidence float64 `json:"confidence"`
RiskScore float64 `json:"risk_score"`
Description string `json:"description"`
Evidence map[string]string `json:"evidence,omitempty"`
Mitigations []string `json:"mitigations,omitempty"`
}
ThreatInfo contains information about the detected threat
Click to show internal directories.
Click to hide internal directories.