terraform

package
v0.0.0-...-8c4efc2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ScannerWithAllDirectories

func ScannerWithAllDirectories(all bool) options.ScannerOption

func ScannerWithAlternativeIDProvider

func ScannerWithAlternativeIDProvider(f func(string) []string) options.ScannerOption

func ScannerWithConfigsFileSystem

func ScannerWithConfigsFileSystem(fsys fs.FS) options.ScannerOption

func ScannerWithDownloadsAllowed

func ScannerWithDownloadsAllowed(allowed bool) options.ScannerOption

func ScannerWithExcludeIgnores

func ScannerWithExcludeIgnores(ruleIDs []string) options.ScannerOption

func ScannerWithExcludedRules

func ScannerWithExcludedRules(ruleIDs []string) options.ScannerOption

func ScannerWithIncludedRules

func ScannerWithIncludedRules(ruleIDs []string) options.ScannerOption

func ScannerWithMinimumSeverity

func ScannerWithMinimumSeverity(minimum severity.Severity) options.ScannerOption

func ScannerWithNoIgnores

func ScannerWithNoIgnores() options.ScannerOption

func ScannerWithResultsFilter

func ScannerWithResultsFilter(f func(scan.Results) scan.Results) options.ScannerOption

func ScannerWithSeverityOverrides

func ScannerWithSeverityOverrides(overrides map[string]string) options.ScannerOption

func ScannerWithSingleThread

func ScannerWithSingleThread(single bool) options.ScannerOption

func ScannerWithSkipDownloaded

func ScannerWithSkipDownloaded(skip bool) options.ScannerOption

func ScannerWithStateFunc

func ScannerWithStateFunc(f ...func(*state.State)) options.ScannerOption

func ScannerWithStopOnHCLError

func ScannerWithStopOnHCLError(stop bool) options.ScannerOption

func ScannerWithStopOnRuleErrors

func ScannerWithStopOnRuleErrors(stop bool) options.ScannerOption

func ScannerWithTFVarsPaths

func ScannerWithTFVarsPaths(paths ...string) options.ScannerOption

func ScannerWithWorkspaceName

func ScannerWithWorkspaceName(name string) options.ScannerOption

Types

type ConfigurableTerraformScanner

type ConfigurableTerraformScanner interface {
	options.ConfigurableScanner
	SetForceAllDirs(bool)
	AddExecutorOptions(options ...executor.Option)
	AddParserOptions(options ...options.ParserOption)
}

type Metrics

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

type Scanner

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

func New

func New(options ...options.ScannerOption) *Scanner

func (*Scanner) AddExecutorOptions

func (s *Scanner) AddExecutorOptions(options ...executor.Option)

func (*Scanner) AddParserOptions

func (s *Scanner) AddParserOptions(options ...options.ParserOption)

func (*Scanner) Name

func (s *Scanner) Name() string

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)

func (*Scanner) SetDataDirs

func (s *Scanner) SetDataDirs(_ ...string)

func (*Scanner) SetDataFilesystem

func (s *Scanner) SetDataFilesystem(_ fs.FS)

func (*Scanner) SetDebugWriter

func (s *Scanner) SetDebugWriter(writer io.Writer)

func (*Scanner) SetForceAllDirs

func (s *Scanner) SetForceAllDirs(b bool)

func (*Scanner) SetFrameworks

func (s *Scanner) SetFrameworks(frameworks []framework.Framework)

func (*Scanner) SetPerResultTracingEnabled

func (s *Scanner) SetPerResultTracingEnabled(_ bool)

func (*Scanner) SetPolicyDirs

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

func (*Scanner) SetPolicyFilesystem

func (s *Scanner) SetPolicyFilesystem(_ fs.FS)

func (*Scanner) SetPolicyNamespaces

func (s *Scanner) SetPolicyNamespaces(_ ...string)

func (*Scanner) SetPolicyReaders

func (s *Scanner) SetPolicyReaders(readers []io.Reader)

func (*Scanner) SetRegoErrorLimit

func (s *Scanner) SetRegoErrorLimit(_ int)

func (*Scanner) SetRegoOnly

func (s *Scanner) SetRegoOnly(regoOnly bool)

func (*Scanner) SetSkipRequiredCheck

func (s *Scanner) SetSkipRequiredCheck(skip bool)

func (*Scanner) SetSpec

func (s *Scanner) SetSpec(spec string)

func (*Scanner) SetTraceWriter

func (s *Scanner) SetTraceWriter(_ io.Writer)

func (*Scanner) SetUseEmbeddedLibraries

func (s *Scanner) SetUseEmbeddedLibraries(b bool)

func (*Scanner) SetUseEmbeddedPolicies

func (s *Scanner) SetUseEmbeddedPolicies(b bool)

Directories

Path Synopsis
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