fieldfilters

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const REDACTION_STR = "*****"

Variables

This section is empty.

Functions

func ParseFieldFilterList

func ParseFieldFilterList(filters string) ([]*tetragon.FieldFilter, error)

Types

type FieldFilter

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

FieldFilter is a helper for filtering fields in events

func FieldFilterFromProto

func FieldFilterFromProto(filter *tetragon.FieldFilter) (*FieldFilter, error)

FieldFilterFromProto constructs a new FieldFilter from a Tetragon API field filter.

func FieldFiltersFromGetEventsRequest

func FieldFiltersFromGetEventsRequest(request *tetragon.GetEventsRequest) ([]*FieldFilter, error)

FieldFiltersFromGetEventsRequest returns a list of EventFieldFilter for a GetEventsRequest.

nolint:revive // revive complains about stutter

func NewExcludeFieldFilter

func NewExcludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)

NewExcludeFieldFilter constructs a new exclusion FieldFilter from a set of fields.

func NewFieldFilter

func NewFieldFilter(eventSet []tetragon.EventType, fields []string, action tetragon.FieldFilterAction, invertEventSet bool) (*FieldFilter, error)

NewFieldFilter constructs a new FieldFilter from a set of fields.

func NewIncludeFieldFilter

func NewIncludeFieldFilter(eventSet []tetragon.EventType, fields []string, invertEventSet bool) (*FieldFilter, error)

NewIncludeFieldFilter constructs a new inclusion FieldFilter from a set of fields.

func (*FieldFilter) Filter

Filter filters the fields in the GetEventsResponse, keeping fields specified in the inclusion filter and discarding fields specified in the exclusion filter. Exclusion takes precedence over inclusion and an empty filter set will keep all remaining fields.

type RedactionFilter

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

func RedactionFilterListFromProto

func RedactionFilterListFromProto(protoFilters []*tetragon.RedactionFilter) ([]*RedactionFilter, error)

func (RedactionFilter) Redact

func (f RedactionFilter) Redact(binary, args string) string

Redact resursively checks any string fields in the event for matches to redaction regexes and replaces any capture groups with `*****`.

NOTE: If you're using multiple redaction filters, reach for RedactionFilterList.Redact() instead.

type RedactionFilterList

type RedactionFilterList struct {
	// contains filtered or unexported fields
}
var RedactionFilters *RedactionFilterList

func ParseRedactionFilterList

func ParseRedactionFilterList(filters string) (*RedactionFilterList, error)

func (RedactionFilterList) Redact

func (f RedactionFilterList) Redact(binary, args string) string

Redact redacts a string based on redaction filters.

Jump to

Keyboard shortcuts

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