sechub

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	Key            string
	ChangeType     ChangeType
	DisabledReason string
	Changed        interface{}
}

type ChangeType

type ChangeType string
const (
	ENABLE  ChangeType = "+"
	DISABLE ChangeType = "-"
	CHANGE  ChangeType = "~"
)

type Controls

type Controls struct {
	Enable  []string      `yaml:"enable,flow,omitempty"`
	Disable yaml.MapSlice `yaml:"disable,omitempty"`
	// contains filtered or unexported fields
}

func (*Controls) UnmarshalYAML added in v0.3.0

func (c *Controls) UnmarshalYAML(b []byte) error

type FindingGroup added in v0.6.0

type FindingGroup struct {
	ControlID string
	Resources FindingResources
}

type FindingGroups added in v0.6.0

type FindingGroups []*FindingGroup

func (FindingGroups) ControlIDs added in v0.6.0

func (fgs FindingGroups) ControlIDs() []string

func (FindingGroups) FindByControlID added in v0.6.0

func (fgs FindingGroups) FindByControlID(id string) (*FindingGroup, error)

type FindingResource added in v0.6.0

type FindingResource struct {
	Arn    string
	Status string
	Note   string
}

type FindingResources added in v0.6.0

type FindingResources []*FindingResource

func (FindingResources) Arns added in v0.6.0

func (frs FindingResources) Arns() []string

func (FindingResources) FindByArn added in v0.6.0

func (frs FindingResources) FindByArn(arn string) (*FindingResource, error)

type Regions

type Regions []*SecHub

type SecHub

type SecHub struct {
	AutoEnable *bool `yaml:"autoEnable,omitempty"`
	Standards  Standards
	Regions    Regions
	// contains filtered or unexported fields
}

func Diff

func Diff(base, a *SecHub) (*SecHub, error)

func Intersect

func Intersect(a, b *SecHub) *SecHub

func Load

func Load(p string) (*SecHub, error)

func New

func New(r string) *SecHub

func Override

func Override(base, a *SecHub) (*SecHub, error)

func (*SecHub) Apply

func (sh *SecHub) Apply(ctx context.Context, cfg aws.Config, reason string) error

func (*SecHub) Fetch

func (sh *SecHub) Fetch(ctx context.Context, cfg aws.Config) error

func (*SecHub) MarshalYAML

func (s *SecHub) MarshalYAML() ([]byte, error)

func (*SecHub) Overlay added in v0.4.0

func (base *SecHub) Overlay(overlay *SecHub)

func (*SecHub) Plan

func (sh *SecHub) Plan(ctx context.Context, cfg aws.Config, reason string) ([]*Change, error)

func (*SecHub) UnmarshalYAML

func (s *SecHub) UnmarshalYAML(b []byte) error

func (*SecHub) Validate added in v0.5.0

func (sh *SecHub) Validate() error

type SecHubForUnmarshal

type SecHubForUnmarshal struct {
	AutoEnable *bool                          `yaml:"autoEnable,omitempty"`
	Standards  map[string]*Standard           `yaml:"standards,omitempty"`
	Regions    map[string]*SecHubForUnmarshal `yaml:"regions,omitempty"`
}

type Standard

type Standard struct {
	Key      string        `yaml:"key,omitempty"`
	Enable   *bool         `yaml:"enable,omitempty"`
	Controls *Controls     `yaml:"controls,omitempty"`
	Findings FindingGroups `yaml:"-"`
	// contains filtered or unexported fields
}

func (*Standard) UnmarshalYAML added in v0.6.0

func (s *Standard) UnmarshalYAML(b []byte) error

type StandardForUnmarshal added in v0.6.0

type StandardForUnmarshal struct {
	Key      string        `yaml:"key,omitempty"`
	Enable   *bool         `yaml:"enable,omitempty"`
	Controls *Controls     `yaml:"controls,omitempty"`
	Findings yaml.MapSlice `yaml:"findings,omitempty"`
}

type StandardForYAML added in v0.6.0

type StandardForYAML struct {
	Enable   *bool         `yaml:"enable,omitempty"`
	Controls *Controls     `yaml:"controls,omitempty"`
	Findings yaml.MapSlice `yaml:"findings,omitempty"`
}

type Standards

type Standards []*Standard

Jump to

Keyboard shortcuts

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