app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config        *Config
	FilterEngine  *filters.FilterEngine
	FindingCloser *actions.FindingCloser
	Notifier      notifiers.Notifier
	Logger        *slog.Logger
}

func New

func New(ctx context.Context, cfg *Config, logger *slog.Logger) (*App, error)

func (*App) CloseFinding

func (a *App) CloseFinding(ctx context.Context, finding *events.SecurityHubV2Finding, statusID int32, comment string) error

func (*App) LoadRulesFromS3

func (a *App) LoadRulesFromS3(ctx context.Context, loader *filters.S3RulesLoader, bucket, prefix string) ([]filters.AutoCloseRule, error)

func (*App) ParseEvent

func (*App) Process

func (a *App) Process(ctx context.Context, evt events.SecurityHubEventInput) error

func (*App) SendNotification

func (a *App) SendNotification(ctx context.Context, finding *events.SecurityHubV2Finding) error

type Config

type Config struct {
	DebugEnabled           bool
	AwsConsoleURL          string
	AwsAccessPortalURL     string
	AwsAccessRoleName      string
	AWSSecurityHubv2Region string
	AutoCloseRules         []filters.AutoCloseRule
	AutoCloseRulesS3Bucket string
	AutoCloseRulesS3Prefix string
	SlackEnabled           bool
	SlackToken             string
	SlackChannel           string
}

func NewConfig

func NewConfig() (*Config, error)

type EventDetail

type EventDetail struct {
	Findings []json.RawMessage `json:"findings"`
}

Jump to

Keyboard shortcuts

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