Documentation
¶
Overview ¶
Package notify sends webhook notifications when findings cross severity thresholds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericFinding ¶
type GenericFinding struct {
NotAfter time.Time `json:"notAfter"`
Name string `json:"name"`
Namespace string `json:"namespace"`
Source store.SourceKind `json:"source"`
Severity store.Severity `json:"severity"`
ProbeOK bool `json:"probeOk"`
}
GenericFinding is a single finding in the generic webhook payload.
type GenericPayload ¶
type GenericPayload struct {
Timestamp time.Time `json:"timestamp"`
Summary string `json:"summary"`
Findings []GenericFinding `json:"findings"`
}
GenericPayload is the JSON body sent to generic webhooks.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier sends alerts for findings that cross severity thresholds.
func New ¶
func New(cfg config.NotificationConfig) *Notifier
New creates a Notifier from notification config. Returns nil if not enabled or no webhooks.
type SlackBlock ¶
SlackBlock is a Slack Block Kit block.
type SlackPayload ¶
type SlackPayload struct {
Blocks []SlackBlock `json:"blocks"`
}
SlackPayload is the JSON body sent to Slack incoming webhooks.
Click to show internal directories.
Click to hide internal directories.