filters

package
v1.18.8 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AndFilterSpecification

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

AndFilterSpecification is a logical AND Filter spec which determines if a list of filter specs satisfy the condition

func (AndFilterSpecification) IsSatisfied

func (a AndFilterSpecification) IsSatisfied(r *policy.RegoMetadata) bool

IsSatisfied implementation for And Filter spec

type CategoryFilterSpecification

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

CategoryFilterSpecification is categories based Filter Spec

func (CategoryFilterSpecification) IsSatisfied

IsSatisfied implementation for category based Filter spec

type PolicyTypesFilterSpecification

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

PolicyTypesFilterSpecification is policy type based Filter Spec

func (PolicyTypesFilterSpecification) IsSatisfied

IsSatisfied implementation for policy type based Filter spec

type ReferenceIDFilterSpecification added in v1.18.2

type ReferenceIDFilterSpecification struct {
	ReferenceID string
}

ReferenceIDFilterSpecification is reference ID based Filter Spec

func (ReferenceIDFilterSpecification) IsSatisfied added in v1.18.2

IsSatisfied implementation for reference ID based Filter spec

type ReferenceIDsFilterSpecification added in v1.18.2

type ReferenceIDsFilterSpecification struct {
	ReferenceIDs []string
}

ReferenceIDsFilterSpecification is reference IDs based Filter Spec

func (ReferenceIDsFilterSpecification) IsSatisfied added in v1.18.2

IsSatisfied implementation for reference IDs based Filter spec

type RegoDataFilter

type RegoDataFilter struct{}

RegoDataFilter is a pre scan filter, it will be used by policy engine before the evaluation of resources start

func (*RegoDataFilter) Filter

func (r *RegoDataFilter) Filter(rmap map[string]*policy.RegoData, input policy.EngineInput) map[string]*policy.RegoData

Filter func will filter based on resource type

type RegoMetadataPreLoadFilter

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

RegoMetadataPreLoadFilter is a pre load filter this filter would be while the policy files are processed by policy engine

func NewRegoMetadataPreLoadFilter

func NewRegoMetadataPreLoadFilter(scanRules, skipRules, categories, policyTypes []string, severity string) *RegoMetadataPreLoadFilter

NewRegoMetadataPreLoadFilter is a constructor func for RegoMetadataPreLoadFilter

func (*RegoMetadataPreLoadFilter) IsAllowed

func (r *RegoMetadataPreLoadFilter) IsAllowed(regoMetadata *policy.RegoMetadata) bool

IsAllowed checks whether a RegoMetadata should be allowed or not

func (*RegoMetadataPreLoadFilter) IsFiltered

func (r *RegoMetadataPreLoadFilter) IsFiltered(regoMetadata *policy.RegoMetadata) bool

IsFiltered checks whether a RegoMetadata should be filtered or not

type ResourceTypeFilterSpecification

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

ResourceTypeFilterSpecification is resource type based Filter Spec

func (ResourceTypeFilterSpecification) IsSatisfied

IsSatisfied implementation for resource type based Filter spec

type SeverityFilterSpecification

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

SeverityFilterSpecification is severity based Filter Spec

func (SeverityFilterSpecification) IsSatisfied

IsSatisfied implementation for severity based Filter spec

Jump to

Keyboard shortcuts

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