openexecmgr

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CgroupSink

type CgroupSink interface {
	AddCgids(cgids []uint64) error
	DeleteCgids(cgids []uint64) error
}

CgroupSink is an observation-only kernel source that must see events from the same pods the exec policies select, and from no others.

type OpenExecManager

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

func NewOpenExecManager

func NewOpenExecManager(logger logr.Logger, status runtimeevent.PolicyStatusRecorder, onLoss runtimeevent.LossFunc, lsm bool, cgroupSinks ...CgroupSink) (*OpenExecManager, error)

NewOpenExecManager loads and attaches the dispatcher for each hook the manager enforces through, along with the executor each one tail-calls. Policies are later represented as maps that those executors scan during events.

func (*OpenExecManager) CollectObservations

func (l *OpenExecManager) CollectObservations(ctx context.Context) ([]runtimeevent.Event, error)

CollectObservations drains the per-cgroup path counters of every enforcer from open/exec. Reading drains events, and hence reported counts represent events since the last drain.

func (*OpenExecManager) PodDeleted

func (l *OpenExecManager) PodDeleted(uid string) error

PodDeleted removes the pod's cgroups from every attached program and drops its bookkeeping.

func (*OpenExecManager) PodEvent

func (l *OpenExecManager) PodEvent(pod corev1.Pod, nsLabels map[string]string, cgInfos []*containers.ContainerCgroupInfo, eventType string) error

func (*OpenExecManager) RuntimePolicyEvent

func (l *OpenExecManager) RuntimePolicyEvent(compiledRb *compiler.EvaluationResult, eventType string) error

Jump to

Keyboard shortcuts

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