securityhubcollector

package
v0.0.0-...-e0515c2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindingRecord

type FindingRecord struct {
	Team             string `csv:"Team"`
	ResourceType     string `csv:"Resource Type"`
	Title            string `csv:"Title"`
	Description      string `csv:"Description"`
	SeverityLabel    string `csv:"Severity Label"`
	RemediationText  string `csv:"Remediation Text"`
	RemediationURL   string `csv:"Remediation URL"`
	ResourceID       string `csv:"Resource ID"`
	AWSAccountID     string `csv:"AWS Account ID"`
	ComplianceStatus string `csv:"Compliance Status"`
	RecordState      string `csv:"Record State"`
	WorkflowStatus   string `csv:"Workflow Status"`
	CreatedAt        string `csv:"Created At"`
	UpdatedAt        string `csv:"Updated At"`
	Region           string `csv:"Region"`
	Environment      string `csv:"Environment"`
	Product          string `csv:"Product"`
	DateCollected    string `csv:"Date Collected"`
}

func (FindingRecord) GetHeaders

func (FindingRecord) GetHeaders() []string

GetHeaders returns a slice of header names from the CSV tags of the struct fields. If a field doesn't have a CSV tag, it falls back to using the field name.

func (FindingRecord) ToSanitizedSlice

func (r FindingRecord) ToSanitizedSlice() []string

type HubCollector

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

HubCollector is a generic struct used to hold setting info

func (*HubCollector) FlushAndClose

func (h *HubCollector) FlushAndClose() error

FlushAndClose flushes the CSV writer and closes the output file

func (*HubCollector) GetFindingsAndWriteToOutput

func (h *HubCollector) GetFindingsAndWriteToOutput(secHubRegion, teamName string, account teams.Account) error

GetFindingsAndWriteToOutput - gets all security hub findings from a single AWS account and writes them to the output file

func (*HubCollector) Initialize

func (h *HubCollector) Initialize(outputFileName string) error

Initialize sets up the HubCollector object and writes the header row to the output file.

Jump to

Keyboard shortcuts

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