Eunomia
0.1.0
A lightweight eBPF-based CloudNative Monitor tool for Container Security and Observability
|
Go to the documentation of this file.
7 #ifndef EUNOMIA_SEC_ANALYZER_H
8 #define EUNOMIA_SEC_ANALYZER_H
70 const std::vector<sec_rule_describe>
rules;
87 prometheus::Family<prometheus::Counter> &eunomia_sec_warn_counter;
88 prometheus::Family<prometheus::Counter> &eunomia_sec_event_counter;
89 prometheus::Family<prometheus::Counter> &eunomia_sec_alert_counter;
100 template<
typename EVNET>
115 std::cout <<
"analyzer is null" << std::endl;
virtual ~files_rule_checker()=default
sec_analyzer(const std::vector< sec_rule_describe > &in_rules)
Definition: sec_analyzer.h:72
virtual ~process_rule_checker()=default
std::mutex mutex
Definition: sec_analyzer.h:69
base class for securiy rules detect handler
Definition: sec_analyzer.h:101
std::string container_name
Definition: sec_analyzer.h:49
syscall rule:
Definition: sec_analyzer.h:153
sec_analyzer_prometheus(prometheus_server &server, const std::vector< sec_rule_describe > &rules)
Definition: sec_analyzer.cpp:28
void report_prometheus_event(const struct rule_message &msg)
Definition: sec_analyzer.cpp:78
std::string message
Definition: sec_analyzer.h:58
sec_rule_type type
Definition: sec_analyzer.h:56
std::string message
Definition: sec_analyzer.h:45
the event handler for single type
Definition: event_handler.h:52
message for sec_rule
Definition: sec_analyzer.h:41
std::string name
Definition: sec_analyzer.h:44
std::shared_ptr< sec_analyzer > analyzer
Definition: sec_analyzer.h:104
sec_rule_level
sec rules info level
Definition: sec_analyzer.h:17
void handle(tracker_event< EVNET > &e)
implement this function to handle the event
Definition: sec_analyzer.h:111
sec_rule_level level
Definition: sec_analyzer.h:43
int check_rule(const tracker_event< process_event > &e, rule_message &msg)
process_rule_checker(std::shared_ptr< sec_analyzer > analyzer_ptr)
Definition: sec_analyzer.h:145
int pid
Definition: sec_analyzer.h:46
static std::shared_ptr< sec_analyzer > create_sec_analyzer_with_additional_rules(const std::vector< sec_rule_describe > &rules)
Definition: sec_analyzer.cpp:165
int check_rule(const tracker_event< syscall_event > &e, rule_message &msg)
Definition: sec_analyzer.cpp:116
virtual ~rule_base()=default
virtual int check_rule(const tracker_event< EVNET > &e, rule_message &msg)=0
static std::shared_ptr< sec_analyzer > create_sec_analyzer_with_additional_rules(const std::vector< sec_rule_describe > &rules, prometheus_server &server)
Definition: sec_analyzer.cpp:182
the basic event type
Definition: event_handler.h:31
sec analyzer manager
Definition: sec_analyzer.h:65
virtual void report_event(const rule_message &msg)
Definition: sec_analyzer.cpp:67
files_rule_checker(std::shared_ptr< sec_analyzer > analyzer_ptr)
Definition: sec_analyzer.h:133
void print_event(const rule_message &msg)
Definition: sec_analyzer.cpp:56
syscall_rule_checker(std::shared_ptr< sec_analyzer > analyzer_ptr)
Definition: sec_analyzer.h:156
virtual ~sec_analyzer()=default
process rule:
Definition: sec_analyzer.h:141
std::string name
Definition: sec_analyzer.h:57
sec analyzer manager with prometheus exporter
Definition: sec_analyzer.h:84
int check_rule(const tracker_event< files_event > &e, rule_message &msg)
files rule:
Definition: sec_analyzer.h:129
Definition: prometheus_server.h:22
const std::vector< sec_rule_describe > rules
Definition: sec_analyzer.h:70
sec_rule_level level
Definition: sec_analyzer.h:55
sec_rule_type
sec rules type
Definition: sec_analyzer.h:28
std::string signature
signature: the signature of the rule, for example, process name, syscall name, etc.
Definition: sec_analyzer.h:61
static std::shared_ptr< sec_analyzer > create_sec_analyzer_with_default_rules(void)
Definition: sec_analyzer.cpp:160
rule_base(std::shared_ptr< sec_analyzer > analyzer_ptr)
Definition: sec_analyzer.h:105
std::string container_id
Definition: sec_analyzer.h:48
describe a sec_rule
Definition: sec_analyzer.h:53
void report_event(const rule_message &msg)
Definition: sec_analyzer.cpp:72