enforcer

package
v0.0.0-...-d1f45ee Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EPERM uint64 = ^uint64(syscall.EACCES - 1)

Permission Denied Return Code, cannot set it to -13 directly (since uint) so a workaround is used leveraging XOR

Functions

This section is empty.

Types

type InnerKey

type InnerKey struct {
	Path   string
	Source string
}

type PtraceEnforcer

type PtraceEnforcer struct {
	Container *tp.Container
	Logger    *feeder.Feeder
	Rules     *RuleSet
}

func NewPtraceEnforcer

func NewPtraceEnforcer(container *tp.Container, logger *feeder.Feeder) *PtraceEnforcer

func (*PtraceEnforcer) StartSystemTracer

func (pe *PtraceEnforcer) StartSystemTracer()

func (*PtraceEnforcer) UpdateRules

func (pe *PtraceEnforcer) UpdateRules(securityPolicies []tp.SecurityPolicy, defaultPosture tp.DefaultPosture)

type RuleConfig

type RuleConfig struct {
	Dir, Hint, Recursive, ReadOnly, OwnerOnly, Deny, Allow bool
}

type RuleSet

type RuleSet struct {
	ProcessRules         map[InnerKey]RuleConfig
	FileRules            map[InnerKey]RuleConfig
	NetworkRules         map[InnerKey]RuleConfig
	ProcWhiteListPosture bool
	FileWhiteListPosture bool
	NetWhiteListPosture  bool
}

func CreateNewRuleSet

func CreateNewRuleSet() (r *RuleSet)

type Tracer

type Tracer struct {
	*PtraceEnforcer
	// contains filtered or unexported fields
}

func (*Tracer) NewBaseLog

func (t *Tracer) NewBaseLog() tp.Log

Jump to

Keyboard shortcuts

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