Documentation ¶
Index ¶
- func OptionWithDataDirs(dirs ...string) func(s *Scanner)
- func OptionWithDebug(debugWriter io.Writer) func(s *Scanner)
- func OptionWithPolicyNamespaces(includeDefaults bool, namespaces ...string) func(s *Scanner)
- func OptionWithTrace(w io.Writer) func(s *Scanner)
- type DynamicMetadata
- type Input
- type InputOptions
- type MetadataRetriever
- type Option
- type Scanner
- type Selector
- type StaticMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionWithDataDirs ¶
func OptionWithDebug ¶
OptionWithDebug - pass the scanner an io.Writer to log debug messages to
func OptionWithTrace ¶
OptionWithTrace - specify an io.Writer for rego tracing
Types ¶
type DynamicMetadata ¶
type InputOptions ¶
type MetadataRetriever ¶
type MetadataRetriever struct {
// contains filtered or unexported fields
}
func NewMetadataRetriever ¶
func NewMetadataRetriever(compiler *ast.Compiler) *MetadataRetriever
func (*MetadataRetriever) RetrieveMetadata ¶
func (m *MetadataRetriever) RetrieveMetadata(ctx context.Context, module *ast.Module) (*StaticMetadata, error)
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func (*Scanner) LoadPolicies ¶
type StaticMetadata ¶
type StaticMetadata struct { ID string AVDID string Type string Title string ShortCode string Description string Severity string RecommendedActions string PrimaryURL string References []string InputOptions InputOptions Package string }
func (StaticMetadata) ToRule ¶
func (m StaticMetadata) ToRule() scan.Rule
Source Files ¶
Click to show internal directories.
Click to hide internal directories.