app

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: 14 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 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