Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultAlertTitle = "(no title)" DefaultAlertDescription = "(no description)" )
Variables ¶
This section is empty.
Functions ¶
func ClusterAlerts ¶
func CosineSimilarity ¶
Types ¶
type Alert ¶
type Alert struct {
ID types.AlertID `json:"id"`
TicketID types.TicketID `json:"ticket_id"`
Schema types.AlertSchema `json:"schema"`
Data any `json:"data"`
Metadata
CreatedAt time.Time `json:"created_at"`
SlackThread *slack.Thread `json:"slack_thread"`
Embedding firestore.Vector32 `json:"-"`
TagIDs map[string]bool `json:"tag_ids"`
}
Alert represents an event of a potential security incident. This model is designed to be immutable. An Alert can be linked to at most one ticket.
func (*Alert) CosineSimilarity ¶
func (*Alert) FillMetadata ¶
func (*Alert) GetTagNames ¶ added in v0.2.0
func (a *Alert) GetTagNames(ctx context.Context, tagGetter func(context.Context, []string) ([]*tag.Tag, error)) ([]string, error)
GetTagNames returns tag names for external API compatibility
func (*Alert) HasSlackThread ¶ added in v0.1.0
HasSlackThread returns true if the alert has a valid Slack thread
type AlertListRepository ¶
type Finding ¶
type Finding struct {
Severity types.AlertSeverity `json:"severity"`
Summary string `json:"summary"`
Reason string `json:"reason"`
Recommendation string `json:"recommendation"`
}
Finding is the conclusion of the alert. This is set by the AI.
type List ¶
type List struct {
ID types.AlertListID `json:"id"`
AlertIDs []types.AlertID `json:"alert_ids"`
SlackThread *slack.Thread `json:"slack_thread"`
SlackMessageID string `json:"slack_message_id"`
Status ListStatus `json:"status"`
CreatedAt time.Time `json:"created_at"`
CreatedBy *slack.User `json:"created_by"`
Metadata
Embedding firestore.Vector32 `json:"-"`
// contains filtered or unexported fields
}
func (*List) FillMetadata ¶
type ListStatus ¶
type ListStatus string
const ( ListStatusUnbound ListStatus = "unbound" ListStatusBound ListStatus = "bound" )
func (ListStatus) DisplayName ¶
func (s ListStatus) DisplayName() string
func (ListStatus) Icon ¶
func (s ListStatus) Icon() string
func (ListStatus) String ¶
func (s ListStatus) String() string
type Metadata ¶
type Metadata struct {
Title string `json:"title"`
Description string `json:"description"`
Attributes []Attribute `json:"attributes"`
TitleSource types.Source `json:"title_source"`
DescriptionSource types.Source `json:"description_source"`
// Tags field is used temporarily during policy processing to pass tag names
// These are converted to TagIDs and not persisted in this field
Tags []string `json:"tags,omitempty"`
}
type QueryOutput ¶
type QueryOutput struct {
Alert []Metadata `json:"alert"`
}
Click to show internal directories.
Click to hide internal directories.