audit

package
v0.0.0-...-f146e69 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PodSecurityViolationsAll = "all"
	PodSecurityViolationsPod = "pod"
)

Variables

This section is empty.

Functions

func GetEvents

func GetEvents(auditFilenames ...string) ([]*auditv1.Event, error)

func IsEquivalentAuditURI

func IsEquivalentAuditURI(lhs, rhs string) bool

IsEquivalentAuditURI is fuzzy matcher that allows equivalence on non-exact matches. This is important for watches and for lists since they can pass a resourceversion and timeout which always diffs, but is rarely importantly different

func NewCmdAudit

func NewCmdAudit(parentName string, streams genericclioptions.IOStreams) *cobra.Command

func PrintAuditEvents

func PrintAuditEvents(writer io.Writer, events []*auditv1.Event)

func PrintAuditEventsWide

func PrintAuditEventsWide(writer io.Writer, events []*auditv1.Event)

func PrintAuditEventsWithCount

func PrintAuditEventsWithCount(writer io.Writer, events []*eventWithCounter)

func PrintSummary

func PrintSummary(w io.Writer, events []*auditv1.Event)

func PrintTopByHTTPStatusCodeAuditEvents

func PrintTopByHTTPStatusCodeAuditEvents(writer io.Writer, numToDisplay int, events []*auditv1.Event)

func PrintTopByNamespace

func PrintTopByNamespace(writer io.Writer, numToDisplay int, events []*auditv1.Event)

func PrintTopByResourceAuditEvents

func PrintTopByResourceAuditEvents(writer io.Writer, numToDisplay int, events []*auditv1.Event)

func PrintTopByUserAuditEvents

func PrintTopByUserAuditEvents(writer io.Writer, numToDisplay int, events []*auditv1.Event)

func PrintTopByVerbAuditEvents

func PrintTopByVerbAuditEvents(writer io.Writer, numToDisplay int, events []*auditv1.Event)

Types

type AuditFilters

type AuditFilters []EventFilterPredicate

func (AuditFilters) FilterEvents

func (f AuditFilters) FilterEvents(events ...*auditv1.Event) []*auditv1.Event

type AuditOptions

type AuditOptions struct {
	genericclioptions.IOStreams
	// contains filtered or unexported fields
}

func NewAuditOptions

func NewAuditOptions(streams genericclioptions.IOStreams) *AuditOptions

func (*AuditOptions) Complete

func (o *AuditOptions) Complete(command *cobra.Command, args []string) error

func (*AuditOptions) Run

func (o *AuditOptions) Run() error

func (*AuditOptions) Validate

func (o *AuditOptions) Validate() error

type EventFilterPredicate

type EventFilterPredicate interface {
	Matches(*auditv1.Event) bool
}

func NewFilterByPodSecurityViolations

func NewFilterByPodSecurityViolations(filterType string) EventFilterPredicate

type FilterByAfter

type FilterByAfter struct {
	After time.Time
}

func (*FilterByAfter) Matches

func (f *FilterByAfter) Matches(event *auditv1.Event) bool

type FilterByAnnotationPresence

type FilterByAnnotationPresence struct {
	AnnotationKey string
}

func (*FilterByAnnotationPresence) Matches

func (f *FilterByAnnotationPresence) Matches(event *auditv1.Event) bool

type FilterByBefore

type FilterByBefore struct {
	Before time.Time
	// contains filtered or unexported fields
}

func (*FilterByBefore) Matches

func (f *FilterByBefore) Matches(event *auditv1.Event) bool

type FilterByDuration

type FilterByDuration struct {
	Duration time.Duration
}

func (*FilterByDuration) Matches

func (f *FilterByDuration) Matches(event *auditv1.Event) bool

type FilterByFailures

type FilterByFailures struct {
}

func (*FilterByFailures) Matches

func (f *FilterByFailures) Matches(event *auditv1.Event) bool

type FilterByHTTPStatus

type FilterByHTTPStatus struct {
	HTTPStatusCodes sets.Int32
}

func (*FilterByHTTPStatus) Matches

func (f *FilterByHTTPStatus) Matches(event *auditv1.Event) bool

type FilterByNames

type FilterByNames struct {
	Names sets.String
}

func (*FilterByNames) Matches

func (f *FilterByNames) Matches(event *auditv1.Event) bool

type FilterByNamespaces

type FilterByNamespaces struct {
	Namespaces sets.String
}

func (*FilterByNamespaces) Matches

func (f *FilterByNamespaces) Matches(event *auditv1.Event) bool

type FilterByResources

type FilterByResources struct {
	Resources map[schema.GroupResource]bool
}

func (*FilterByResources) Matches

func (f *FilterByResources) Matches(event *auditv1.Event) bool

type FilterByStage

type FilterByStage struct {
	Stages sets.String
}

func (*FilterByStage) Matches

func (f *FilterByStage) Matches(event *auditv1.Event) bool

type FilterBySubresources

type FilterBySubresources struct {
	Subresources sets.String
}

func (*FilterBySubresources) Matches

func (f *FilterBySubresources) Matches(event *auditv1.Event) bool

type FilterByUIDs

type FilterByUIDs struct {
	UIDs sets.String
}

func (*FilterByUIDs) Matches

func (f *FilterByUIDs) Matches(event *auditv1.Event) bool

type FilterByUser

type FilterByUser struct {
	Users sets.String
}

func (*FilterByUser) Matches

func (f *FilterByUser) Matches(event *auditv1.Event) bool

type FilterByVerbs

type FilterByVerbs struct {
	Verbs sets.String
}

func (*FilterByVerbs) Matches

func (f *FilterByVerbs) Matches(event *auditv1.Event) bool

type FilterUnion

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

func (*FilterUnion) Matches

func (f *FilterUnion) Matches(event *auditv1.Event) bool

Jump to

Keyboard shortcuts

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