autosuppression

package
v0.0.0-...-23a0380 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package autosuppression holds auto suppression related files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoSuppression

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

AutoSuppression is a struct that encapsulates the auto suppression logic

func (*AutoSuppression) Apply

func (as *AutoSuppression) Apply(ruleSet *rules.RuleSet)

Apply resets the auto suppression stats based on the given ruleset

func (*AutoSuppression) GetStats

func (as *AutoSuppression) GetStats() map[StatsTags]int64

GetStats returns the auto suppressions stats

func (*AutoSuppression) Init

func (as *AutoSuppression) Init(opts Opts)

Init initializes the auto suppression with the given options

func (*AutoSuppression) Suppresses

func (as *AutoSuppression) Suppresses(rule *rules.Rule, event *model.Event) bool

Suppresses returns true if the event should be suppressed for the given rule, false otherwise. It also counts statistics depending on this result

type Opts

type Opts struct {
	SecurityProfileEnabled                bool
	SecurityProfileAutoSuppressionEnabled bool
	ActivityDumpEnabled                   bool
	ActivityDumpAutoSuppressionEnabled    bool
	EventTypes                            []model.EventType
}

Opts holds options for auto suppression

type StatsTags

type StatsTags struct {
	RuleID          string
	SuppressionType string
}

StatsTags holds tags for auto suppression stats

Jump to

Keyboard shortcuts

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