Documentation ¶
Index ¶
- Variables
- func Dial() (*grpc.ClientConn, context.CancelFunc, error)
- type AppArmor
- type BpfAppArmorFileProcessed
- type BpfAppArmorProcessed
- type BpfAppArmorSocketEvent
- type BpfRecorder
- func (b *BpfRecorder) FilterProgramName(filter string)
- func (b *BpfRecorder) FindProcMountNamespace(pid uint32) (uint32, error)
- func (b *BpfRecorder) GetAppArmorProcessed() BpfAppArmorProcessed
- func (b *BpfRecorder) Load(startEventProcessor bool) (err error)
- func (b *BpfRecorder) Run() error
- func (b *BpfRecorder) Start(context.Context, *api.EmptyRequest) (*api.EmptyResponse, error)
- func (b *BpfRecorder) Stop(context.Context, *api.EmptyRequest) (*api.EmptyResponse, error)
- func (b *BpfRecorder) Syscalls() *bpf.BPFMap
- func (b *BpfRecorder) SyscallsForProfile(_ context.Context, r *api.ProfileRequest) (*api.SyscallsResponse, error)
- func (b *BpfRecorder) Unload()
- func (b *BpfRecorder) WaitForPidExit(pid uint32, timeout time.Duration) error
- type Seccomp
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("no recorded profile found")
ErrNotFound is the GRPC error if no recorded profile found.
Functions ¶
func Dial ¶
func Dial() (*grpc.ClientConn, context.CancelFunc, error)
Dial can be used to connect to the default GRPC server by creating a new client.
Types ¶
type AppArmor ¶ added in v0.8.3
type AppArmor struct{}
func (*AppArmor) AddSpecificInstrumentation ¶ added in v0.8.3
func (*AppArmor) AddSpecificInstrumentation(b *BpfRecorder, module *bpf.Module) error
func (*AppArmor) SetupAndProcessSpecificEvents ¶ added in v0.8.3
func (*AppArmor) SetupAndProcessSpecificEvents(b *BpfRecorder, module *bpf.Module) error
type BpfAppArmorFileProcessed ¶ added in v0.8.3
type BpfAppArmorProcessed ¶ added in v0.8.3
type BpfAppArmorProcessed struct { FileProcessed BpfAppArmorFileProcessed Socket BpfAppArmorSocketEvent Capabilities []string }
type BpfAppArmorSocketEvent ¶ added in v0.8.3
type BpfRecorder ¶
type BpfRecorder struct { api.UnimplementedBpfRecorderServer // contains filtered or unexported fields }
BpfRecorder is the main structure of this package.
func NewAppArmor ¶ added in v0.8.3
func NewAppArmor(logger logr.Logger) *BpfRecorder
NewAppArmor returns a new BpfRecorder instance.
func NewSeccomp ¶ added in v0.8.3
func NewSeccomp(logger logr.Logger) *BpfRecorder
NewSeccomp returns a new BpfRecorder instance for seccomp profiles.
func (*BpfRecorder) FilterProgramName ¶ added in v0.7.0
func (b *BpfRecorder) FilterProgramName(filter string)
FilterProgramName can be used to filter on a specific program name.
func (*BpfRecorder) FindProcMountNamespace ¶ added in v0.7.0
func (b *BpfRecorder) FindProcMountNamespace(pid uint32) (uint32, error)
FindProcMountNamespace is looking up the mnt ns for a given PID.
func (*BpfRecorder) GetAppArmorProcessed ¶ added in v0.8.3
func (b *BpfRecorder) GetAppArmorProcessed() BpfAppArmorProcessed
func (*BpfRecorder) Load ¶ added in v0.7.0
func (b *BpfRecorder) Load(startEventProcessor bool) (err error)
Load prestarts the bpf recorder.
func (*BpfRecorder) Start ¶
func (b *BpfRecorder) Start( context.Context, *api.EmptyRequest, ) (*api.EmptyResponse, error)
func (*BpfRecorder) Stop ¶
func (b *BpfRecorder) Stop( context.Context, *api.EmptyRequest, ) (*api.EmptyResponse, error)
func (*BpfRecorder) Syscalls ¶ added in v0.7.0
func (b *BpfRecorder) Syscalls() *bpf.BPFMap
Syscalls returns the bpf map containing the PID (key) to syscalls (value) data.
func (*BpfRecorder) SyscallsForProfile ¶
func (b *BpfRecorder) SyscallsForProfile( _ context.Context, r *api.ProfileRequest, ) (*api.SyscallsResponse, error)
SyscallsForProfile returns the syscall names for the provided profile name.
func (*BpfRecorder) Unload ¶ added in v0.7.0
func (b *BpfRecorder) Unload()
Unload can be used to reset the bpf recorder.
func (*BpfRecorder) WaitForPidExit ¶ added in v0.8.3
func (b *BpfRecorder) WaitForPidExit(pid uint32, timeout time.Duration) error
type Seccomp ¶ added in v0.8.3
type Seccomp struct{}
func (*Seccomp) AddSpecificInstrumentation ¶ added in v0.8.3
func (*Seccomp) AddSpecificInstrumentation(_ *BpfRecorder, _ *bpf.Module) error
func (*Seccomp) SetupAndProcessSpecificEvents ¶ added in v0.8.3
func (*Seccomp) SetupAndProcessSpecificEvents(_ *BpfRecorder, _ *bpf.Module) error