recommendations

package
v1.13.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	// contains filtered or unexported fields
}

Analyzer analyzes SID statistics and generates recommendations

func NewAnalyzer

func NewAnalyzer(cache *stats.Cache) *Analyzer

NewAnalyzer creates a new recommendations analyzer

func (*Analyzer) AnalyzeAll

func (a *Analyzer) AnalyzeAll() ([]*Recommendation, error)

AnalyzeAll generates all recommendations

func (*Analyzer) GenerateSummary

func (a *Analyzer) GenerateSummary() map[string]interface{}

GenerateSummary creates a summary report

func (*Analyzer) GetRecentThreats

func (a *Analyzer) GetRecentThreats(duration time.Duration) []*stats.SIDStats

GetRecentThreats returns recently triggered rules

func (*Analyzer) GetTopNoisyRules

func (a *Analyzer) GetTopNoisyRules(n int) []*stats.SIDStats

GetTopNoisyRules returns rules with highest trigger counts

type Recommendation

type Recommendation struct {
	Type         RecommendationType
	SID          string
	Signature    string
	Category     string
	Severity     string // high, medium, low
	Reason       string
	Evidence     []string
	Action       string
	TriggerCount int
	SourceCount  int
	Ratio        float64 // Triggers per unique source
}

Recommendation represents a single recommendation

type RecommendationType

type RecommendationType string

RecommendationType represents the type of recommendation

const (
	FalsePositive      RecommendationType = "false_positive"
	NoiseReduction     RecommendationType = "noise_reduction"
	DropMode           RecommendationType = "drop_mode"
	DisableRule        RecommendationType = "disable_rule"
	InvestigateFurther RecommendationType = "investigate"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL