terraform

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionWithDataDirs

func OptionWithDataDirs(dirs ...string) func(s *Scanner)

OptionWithDataDirs - location of rego data directories

func OptionWithPolicyDirs

func OptionWithPolicyDirs(dirs ...string) func(s *Scanner)

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

func OptionWithPolicyNamespaces

func OptionWithPolicyNamespaces(namespaces ...string) func(s *Scanner)

OptionWithPolicyNamespaces - namespaces which indicate rego policies containing enforced rules

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

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 OptionWithDebug

func OptionWithDebug(w io.Writer) Option

func OptionWithDownloads

func OptionWithDownloads(allowed bool) Option

func OptionWithExcludePaths

func OptionWithExcludePaths(paths []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 OptionWithStateFunc

func OptionWithStateFunc(f ...func(*state.State)) Option

func OptionWithTFVarsPaths

func OptionWithTFVarsPaths(paths []string) Option

func OptionWithTrace

func OptionWithTrace(w io.Writer) Option

func OptionWithWorkspaceName

func OptionWithWorkspaceName(name string) Option

type Scanner

type Scanner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(options ...Option) *Scanner

func (*Scanner) ScanFS

func (s *Scanner) ScanFS(ctx context.Context, target fs.FS, dir string) (scan.Results, error)

func (*Scanner) ScanFSWithMetrics

func (s *Scanner) ScanFSWithMetrics(ctx context.Context, target fs.FS, dir string) (scan.Results, Metrics, error)

Directories

Path Synopsis
funcs
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs
Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/marks Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs Copied from github.com/hashicorp/terraform/internal/lang/funcs

Jump to

Keyboard shortcuts

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