filters

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoCloseRule

type AutoCloseRule struct {
	Name             string      `json:"name"`
	Enabled          bool        `json:"enabled"`
	Filters          RuleFilters `json:"filters"`
	Action           RuleAction  `json:"action"`
	SkipNotification bool        `json:"skip_notification"`
}

type FilterEngine

type FilterEngine struct {
	Rules []AutoCloseRule
}

func NewFilterEngine

func NewFilterEngine(rules []AutoCloseRule) *FilterEngine

func (*FilterEngine) FindMatchingRule

func (e *FilterEngine) FindMatchingRule(finding *events.SecurityHubV2Finding) (*AutoCloseRule, bool)

type ResourceTagFilter

type ResourceTagFilter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type RuleAction

type RuleAction struct {
	StatusID int32  `json:"status_id"`
	Comment  string `json:"comment"`
}

type RuleFilters

type RuleFilters struct {
	FindingTypes  []string            `json:"finding_types,omitempty"`
	Severity      []string            `json:"severity,omitempty"`
	ProductName   []string            `json:"product_name,omitempty"`
	ResourceTypes []string            `json:"resource_types,omitempty"`
	ResourceTags  []ResourceTagFilter `json:"resource_tags,omitempty"`
	Accounts      []string            `json:"accounts,omitempty"`
	Regions       []string            `json:"regions,omitempty"`
}

type S3Client

type S3Client interface {
	ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
	GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}

type S3RulesLoader

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

func NewS3RulesLoader

func NewS3RulesLoader(client S3Client) *S3RulesLoader

func (*S3RulesLoader) LoadRules

func (l *S3RulesLoader) LoadRules(ctx context.Context, bucket, prefix string) ([]AutoCloseRule, error)

Jump to

Keyboard shortcuts

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