Documentation ¶
Index ¶
- func NewModule(cfg *config.Config) (api.Module, error)
- type APIServer
- func (a *APIServer) Apply(ruleIDs []rules.RuleID)
- func (a *APIServer) DumpProcessCache(ctx context.Context, params *api.DumpProcessCacheParams) (*api.SecurityDumpProcessCacheMessage, error)
- func (a *APIServer) GetEvents(params *api.GetEventParams, stream api.SecurityModule_GetEventsServer) error
- func (a *APIServer) GetStats() map[string]int64
- func (a *APIServer) SendEvent(rule *rules.Rule, event Event)
- func (a *APIServer) SendStats() error
- type AgentContext
- type Event
- type Limit
- type Limiter
- type LimiterOpts
- type Module
- func (m *Module) Close()
- func (m *Module) EventDiscarderFound(rs *rules.RuleSet, event eval.Event, field eval.Field, ...)
- func (m *Module) GetProbe() *sprobe.Probe
- func (m *Module) GetRuleSet() *rules.RuleSet
- func (m *Module) GetStats() map[string]interface{}
- func (m *Module) HandleCustomEvent(rule *rules.Rule, event *sprobe.CustomEvent)
- func (m *Module) HandleEvent(event *sprobe.Event)
- func (m *Module) Register(httpMux *http.ServeMux) error
- func (m *Module) Reload() error
- func (m *Module) RuleMatch(rule *rules.Rule, event eval.Event)
- func (m *Module) SendEvent(rule *rules.Rule, event Event)
- type RateLimiter
- type RateLimiterStat
- type RuleEvent
- type Signal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APIServer ¶
APIServer represents a gRPC server in charge of receiving events sent by the runtime security system-probe module and forwards them to Datadog
func NewAPIServer ¶
NewAPIServer returns a new gRPC event server
func (*APIServer) DumpProcessCache ¶
func (a *APIServer) DumpProcessCache(ctx context.Context, params *api.DumpProcessCacheParams) (*api.SecurityDumpProcessCacheMessage, error)
DumpProcessCache handle process dump cache requests
func (*APIServer) GetEvents ¶
func (a *APIServer) GetEvents(params *api.GetEventParams, stream api.SecurityModule_GetEventsServer) error
GetEvents waits for security events
func (*APIServer) GetStats ¶
GetStats returns a map indexed by ruleIDs that describes the amount of events that were expired or rate limited before reaching
type AgentContext ¶
type AgentContext struct { RuleID string `json:"ruleId"` RuleVersion string `json:"ruleVersion,omitempty"` PolicyName string `json:"policyName,omitempty"` PolicyVersion string `json:"policyVersion,omitempty"` }
AgentContext serializes the agent context to JSON easyjson:json
func (AgentContext) MarshalEasyJSON ¶
func (v AgentContext) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AgentContext) MarshalJSON ¶
func (v AgentContext) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AgentContext) UnmarshalEasyJSON ¶
func (v *AgentContext) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AgentContext) UnmarshalJSON ¶
func (v *AgentContext) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Limiter ¶
type Limiter struct {
// contains filtered or unexported fields
}
Limiter describes an object that applies limits on the rate of triggering of a rule to ensure we don't overflow with too permissive rules
type LimiterOpts ¶
LimiterOpts rate limiter options
type Module ¶
Module represents the system-probe module for the runtime security agent
func (*Module) EventDiscarderFound ¶
func (m *Module) EventDiscarderFound(rs *rules.RuleSet, event eval.Event, field eval.Field, eventType eval.EventType)
EventDiscarderFound is called by the ruleset when a new discarder discovered
func (*Module) GetRuleSet ¶
GetRuleSet returns the set of loaded rules
func (*Module) HandleCustomEvent ¶
func (m *Module) HandleCustomEvent(rule *rules.Rule, event *sprobe.CustomEvent)
HandleCustomEvent is called by the probe when an event should be sent to Datadog but doesn't need evaluation
func (*Module) HandleEvent ¶
HandleEvent is called by the probe when an event arrives from the kernel
type RateLimiter ¶
RateLimiter describes a set of rule rate limiters
func NewRateLimiter ¶
func NewRateLimiter(client *statsd.Client, opts LimiterOpts) *RateLimiter
NewRateLimiter initializes an empty rate limiter
func (*RateLimiter) Allow ¶
func (rl *RateLimiter) Allow(ruleID string) bool
Allow returns true if a specific rule shall be allowed to sent a new event
func (*RateLimiter) GetStats ¶
func (rl *RateLimiter) GetStats() map[rules.RuleID]RateLimiterStat
GetStats returns a map indexed by ruleIDs that describes the amount of events that were dropped because of the rate limiter
func (*RateLimiter) SendStats ¶
func (rl *RateLimiter) SendStats() error
SendStats sends statistics about the number of sent and drops events for the set of rules
type RateLimiterStat ¶
type RateLimiterStat struct {
// contains filtered or unexported fields
}
RateLimiterStat represents the rate limiting statistics
type Signal ¶
type Signal struct { *AgentContext `json:"agent"` Title string `json:"title"` }
Signal - Rule event wrapper used to send an event to the backend easyjson:json
func (Signal) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Signal) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Signal) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Signal) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface