policy

package
v0.5.28 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Terraform      = Target("terraform")
	TerraformPlan  = Target("terraform-plan")
	Cloudformation = Target("cloudformation")
	Kubernetes     = Target("kubernetes")
	Helm           = Target("helm")
	Docker         = Target("docker")
	Secrets        = Target("secrets")
	None           = Target("")
)

Variables

This section is empty.

Functions

func RegisterRuleType added in v0.5.23

func RegisterRuleType(ruleType RuleType)

Types

type PassFail

type PassFail *bool

type Rule

type Rule struct {
	ID       string
	Path     string
	Metadata map[string]interface{}
	Targets  []Target
}

type RuleType

type RuleType interface {
	GetName() string
	GetCode() string
	PrepareRules(rules []*Rule, dest string) error
	FindRuleResult(findings assessments.Findings, id string) PassFail
}

func GetRuleType added in v0.5.23

func GetRuleType(ruleTypeName string) RuleType

func GetRuleTypes added in v0.5.27

func GetRuleTypes() (res []RuleType)

type Store added in v0.5.27

type Store struct {
	Dir   string
	Rules map[RuleType][]*Rule
}

func (*Store) CreateTarBall added in v0.5.27

func (m *Store) CreateTarBall(path string) error

func (*Store) GetPolicyUploadMetadata added in v0.5.27

func (m *Store) GetPolicyUploadMetadata() (map[string]string, error)

func (*Store) LoadRules added in v0.5.27

func (m *Store) LoadRules() error

func (*Store) LoadRulesOfType added in v0.5.27

func (m *Store) LoadRulesOfType(ruleType RuleType) error

func (*Store) LoadSingleRule added in v0.5.27

func (m *Store) LoadSingleRule(ruleType RuleType, path string) (*Rule, error)

func (*Store) PrepareRules added in v0.5.27

func (m *Store) PrepareRules(dest string) error

func (*Store) RuleCount added in v0.5.27

func (m *Store) RuleCount() (count int)

type Target

type Target string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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