analyzer

package
v3.114.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPolicyPackConfigFromFile

func LoadPolicyPackConfigFromFile(file string) (map[string]plugin.AnalyzerPolicyConfig, error)

LoadPolicyPackConfigFromFile loads the JSON config from a file.

func ParsePolicyPackConfigFromAPI

func ParsePolicyPackConfigFromAPI(config map[string]*json.RawMessage) (map[string]plugin.AnalyzerPolicyConfig, error)

ParsePolicyPackConfigFromAPI parses the config returned from the service.

func ReconcilePolicyPackConfig

func ReconcilePolicyPackConfig(
	policies []plugin.AnalyzerPolicyInfo,
	initialConfig map[string]plugin.AnalyzerPolicyConfig,
	config map[string]plugin.AnalyzerPolicyConfig,
) (map[string]plugin.AnalyzerPolicyConfig, []string, error)

ReconcilePolicyPackConfig takes metadata about each policy containing default values and config schema, and reconciles this with the given config to produce a new config that has all default values filled-in and then sets configured values.

func ValidatePolicyPackConfig

func ValidatePolicyPackConfig(schemaMap map[string]apitype.PolicyConfigSchema,
	config map[string]*json.RawMessage,
) (err error)

ValidatePolicyPackConfig validates a policy pack configuration against the specified config schema.

Types

This section is empty.

Jump to

Keyboard shortcuts

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