cloudig

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(ss []string, s string) bool

Contains tells whether slice of strings 'ss' contains string 's'.

func ContainsKey

func ContainsKey(sm []map[string]string, key string) string

ContainsKey returns value if key present in slice of map[string]string

func ProcessReport

func ProcessReport(sess *session.Session, report Report, outputType string, commentsFile string, roleARNs string) error

ProcessReport collects the different reports for each account concurrently

Types

type Comments

type Comments struct {
	AccountID               string              `yaml:"accountid"`
	TAFindings              []map[string]string `yaml:"ta-findings"`
	ConfigFindings          []map[string]string `yaml:"config-findings"`
	InspectorReportFindings []map[string]string `yaml:"inspector-findings"`
	HealthReportFindings    []map[string]string `yaml:"health-findings"`
	ImageScanFindings       []map[string]string `yaml:"ecr-findings"`
	ReflectIAMFindings      []map[string]string `yaml:"reflect-iam-findings"`
}

Comments is a Collection of user comments mapped to yaml structure

type ConfigReport

type ConfigReport struct {
	Findings []configFinding `json:"findings"`
	// contains filtered or unexported fields
}

ConfigReport is a struct that contains an array of aws config compliance findings

func (*ConfigReport) GetReport

func (report *ConfigReport) GetReport(client awslocal.APIs, comments []Comments) error

GetReport retrives the aws config compliance report for a given account,

type HealthReport

type HealthReport struct {
	Findings []healthReportFinding `json:"findings"`
	Flags    healthReportFlags     `json:"-"` // hide in json output
	// contains filtered or unexported fields
}

HealthReport is a struct that contains an array of healthReport

func (*HealthReport) GetReport

func (report *HealthReport) GetReport(client awslocal.APIs, comments []Comments) error

GetReport builds the Inspector report for a given assessment run

type ImageScanFindings

type ImageScanFindings struct {
	AccountID          string           `json:"accountId"`
	ImageDigest        string           `json:"imageDigest"`
	ImageTag           string           `json:"imageTag"`
	RepositoryName     string           `json:"repositoryName"`
	ImageFindingsCount map[string]int64 `json:"imageFindingsCount"`
	Comments           string           `json:"comments"`
	Region             string           `json:"region"`
}

ImageScanFindings struct specify the scan finding reports format

type ImageScanReportFlags

type ImageScanReportFlags struct {
	Tag    string `json:"tag,omitempty"`
	Region string `json:"region"`
}

ImageScanReportFlags struct specify the format of passed in flags

type ImageScanReports

type ImageScanReports struct {
	Findings []ImageScanFindings  `json:"findings"`
	Flags    ImageScanReportFlags `json:"-"` // hide in json output
	// contains filtered or unexported fields
}

ImageScanReports struct specify the format of scan reports

func (*ImageScanReports) GetReport

func (report *ImageScanReports) GetReport(client awslocal.APIs, comments []Comments) error

GetReport of the vulnerability count of the images of the builds

type InspectorHelper

type InspectorHelper struct{}

InspectorHelper is a struct that implements the reportDownloader interface inorder to fake downloading a report for testing scenarios

type InspectorReports

type InspectorReports struct {
	Reports []inspectorReport `json:"reports"`
	Helper  reportDownloader  `json:"-"`
	// contains filtered or unexported fields
}

InspectorReports is a struct that contains an array of inspectorReport

func (*InspectorReports) GetReport

func (reports *InspectorReports) GetReport(client awslocal.APIs, comments []Comments) error

GetReport builds the Inspector report for a given assessment run

type ReflectFlags

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

ReflectFlags provides a collection of different flags for various stages of handling requests

func NewReflectFlags

func NewReflectFlags(region string, roles []string, roleTags map[string]string, usageReport, errorReport, includeIdentity bool, absTime string, relTime int) ReflectFlags

NewReflectFlags returns a new instance Reflectflag

type ReflectReport

type ReflectReport struct {
	Findings []reflectFinding `json:"findings"`
	Flags    ReflectFlags     `json:"-"` // hide in json output
	// contains filtered or unexported fields
}

ReflectReport is struct that contains a slice of Reflect findings

func (*ReflectReport) GetReport

func (report *ReflectReport) GetReport(client awslocal.APIs, comments []Comments) error

GetReport retrives the reflect report for a given account

type Report

type Report interface {
	GetReport(client awslocal.APIs, comments []Comments) error
	// contains filtered or unexported methods
}

Report is an interface that all types of reports will implement

type TrustedAdvisorReport

type TrustedAdvisorReport struct {
	Findings []trustedAdvisorFinding `json:"findings"`
	// contains filtered or unexported fields
}

TrustedAdvisorReport is struct that contains an array of Trusted Advisor findings

func (*TrustedAdvisorReport) GetReport

func (report *TrustedAdvisorReport) GetReport(client awslocal.APIs, comments []Comments) error

GetReport retrives the trusted advisor report for a given account,

Jump to

Keyboard shortcuts

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