terraform

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionWithPolicyDirs added in v0.19.0

func OptionWithPolicyDirs(dirs []string) func(s *Scanner)

OptionWithPolicyDirs - location of rego policy directories - policies are loaded recursively

Types

type Metrics

type Metrics struct {
	Parser   parser.Metrics
	Executor executor.Metrics
	Timings  struct {
		Total time.Duration
	}
}

type Option

type Option func(s *Scanner)

func OptionExcludeRules

func OptionExcludeRules(ruleIDs []string) Option

func OptionIncludeRules

func OptionIncludeRules(ruleIDs []string) Option

func OptionNoIgnores added in v0.19.0

func OptionNoIgnores() Option

func OptionScanAllDirectories

func OptionScanAllDirectories(all bool) Option

func OptionSkipDownloaded

func OptionSkipDownloaded(skip bool) Option

func OptionStopOnHCLError

func OptionStopOnHCLError(stop bool) Option

func OptionStopOnRuleErrors

func OptionStopOnRuleErrors(stop bool) Option

func OptionWithAlternativeIDProvider

func OptionWithAlternativeIDProvider(f func(string) string) Option

func OptionWithDebugWriter

func OptionWithDebugWriter(w io.Writer) Option

func OptionWithExcludePaths

func OptionWithExcludePaths(paths []string) Option

func OptionWithIncludeOnlyResults

func OptionWithIncludeOnlyResults(ids []string) Option

func OptionWithMinimumSeverity

func OptionWithMinimumSeverity(minimum severity.Severity) Option

func OptionWithSeverityOverrides

func OptionWithSeverityOverrides(overrides map[string]string) Option

func OptionWithSingleThread

func OptionWithSingleThread(single bool) Option

func OptionWithTFVarsPaths

func OptionWithTFVarsPaths(paths []string) Option

func OptionWithWorkspaceName

func OptionWithWorkspaceName(name string) Option

type Scanner

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

func New

func New(options ...Option) *Scanner

func (*Scanner) AddPath

func (s *Scanner) AddPath(path string) error

func (*Scanner) Scan

func (s *Scanner) Scan() (rules.Results, Metrics, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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