root

package
v0.0.0-...-869fb85 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StopOnError bool
View Source
var VerboseErrors bool

Functions

func ProcessTimeFilterValue

func ProcessTimeFilterValue(filter *Filter) (filterValue time.Time, err error)

Types

type Account

type Account struct {
	ID    string
	Alias string
	Roles []Role
}

type Accounts

type Accounts struct {
	Accounts []Account
}

type CommandLineArgs

type CommandLineArgs struct {
	RoleArn          string
	ExternalID       string
	AccountsFilePath string
	PoliciesFilePath string
	RoleSessionName  string
	Regions          []string
	StopOnError      bool
	Output           string
	Order            string
	LogLevel         string
	AccessKeyID      string
	SecretAccessKey  string
	SessionToken     string
}

CommandLineArgs represents the arguments passed by the user

type Configs

type Configs struct {
	Playbook Playbook
	Policies Policies
	Accounts []Account
}

Configs represents the parsed and validated playbook, policies and accounts

type Email

type Email struct {
	Provider   string
	Host       string
	Port       string
	Username   string
	Password   string
	Region     string
	Source     string
	Subject    string
	Recipients []string
	Threshold  string
}

Email has the settings to be used to connect to a mail server and what the propertie of the email to send

type Filter

type Filter struct {
	Criterion  string
	Comparison string
	Unit       string
	Value      string
	Values     []string
}

Filter represents the criteria used to match specific resources

type Play

type Play struct {
	Name            string
	Regions         []string
	Policies        []string
	Targets         []PlaybookTarget
	IgnoreResources []string `yaml:"ignore_resources"`
}

Play represents the items within the playbook yaml file

type Playbook

type Playbook struct {
	AccountsFile string `yaml:"accounts"`
	PoliciesFile string `yaml:"policies"`
	Plays        []Play
	Email        Email
	Slack        Slack
	Targets      []PlaybookTarget
}

Playbook represents the parsed playbook yaml file

type PlaybookTarget

type PlaybookTarget struct {
	RoleType string `yaml:"roleType"`
	Include  []string
	Exclude  []string
}

PlaybookTarget represents the IAM Roles and Accounts to run the playbook against

type Policies

type Policies struct {
	Policies []Policy
}

Policies - todo

type Policy

type Policy struct {
	Name         string
	Desc         string
	Resource     string
	Severity     string // critical, high, medium, low
	ModifyResult string
	Filters      []Filter
	Actions      []string
}

Policy - todo

type Role

type Role struct {
	Name       string
	RoleType   string `yaml:"roleType"`
	ExternalID string `yaml:"externalId"`
}

type Slack

type Slack struct {
	Channel   string
	Token     string
	Username  string
	Threshold string
}

Slack is the settings used to post messages to a slack channel

Directories

Path Synopsis
aws
iam
s3

Jump to

Keyboard shortcuts

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