Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildAcctMap ¶
BuildAcctMap - builds a map of accounts to teams from a map of teams to accounts. The JSON file (and the Teams object we extract from it) maps teams to a list of accounts (because that is easiest for humans), but what we really want for building our output is to have a mapping of accounts to teams, because accounts are what we actually get from the security hub finding.
Types ¶
type HubCollector ¶
type HubCollector struct { Logger *zap.Logger HubClient securityhubiface.SecurityHubAPI Outfile string AcctMap map[string]string }
HubCollector is a generic struct used to hold setting info
func (*HubCollector) ConvertFindingToRows ¶
func (h *HubCollector) ConvertFindingToRows(finding *securityhub.AwsSecurityFinding) [][]string
ConvertFindingToRows - converts a single finding to the record format we're using
func (*HubCollector) GetSecurityHubFindings ¶
func (h *HubCollector) GetSecurityHubFindings() ([]*securityhub.AwsSecurityFinding, error)
GetSecurityHubFindings - gets all security hub findings from a single AWS account
func (*HubCollector) WriteFindingsToOutput ¶
func (h *HubCollector) WriteFindingsToOutput(findings []*securityhub.AwsSecurityFinding) (err error)
WriteFindingsToOutput - takes a list of security
type Team ¶
Team is a struct describing a single team and its accounts as we expect in the JSON file describing team mappings
type Teams ¶
type Teams struct {
Teams []Team `json:"teams"`
}
Teams is a struct describing the format we expect in the JSON file describing the team mappings
func ReadTeamMap ¶
ReadTeamMap - takes the JSON encoded file that maps teams to accounts and converts it into a Teams object that we can use later.