scanner

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptionIncludeIgnored

func OptionIncludeIgnored() func(s *Scanner)

OptionIncludeIgnored - tell the scanner to include results that would otherwise be ignored

func OptionIncludePassed

func OptionIncludePassed() func(s *Scanner)

OptionIncludePassed - tell the scanner to include results for passes checks

func OptionWithDebug

func OptionWithDebug(debugWriter io.Writer) func(s *Scanner)

OptionWithDebug - pass the scanner an io.Writer to log debug messages to

func OptionWithExcludedIDs

func OptionWithExcludedIDs(exludedIDs []string) func(s *Scanner)

OptionWithExcludedIDs - tell the scanner to exclude the provided IDs

func OptionWithPolicyDirs added in v0.19.0

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

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

func OptionWithPolicyNamespaces added in v0.23.0

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

OptionWithPolicyNamespaces - namespaces which indicate rego policies containing enforced rules

Types

type Ignore

type Ignore struct {
	RuleID string
	Expiry *time.Time
}

type Option

type Option func(s *Scanner)

Option - scanner options for passing arguments into the scanner

type Scanner

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

func New

func New(options ...Option) *Scanner

New creates a new Scanner

func (*Scanner) AddPath

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

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context) (results rules.Results, err error)

Jump to

Keyboard shortcuts

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