Luca Guerra
ddc736057f
cleanup(falco): apply review suggestion about extra_output_field_t
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
2024-09-09 15:31:24 +02:00
Luca Guerra
aeb4126ce2
fix(falco): update json schema
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-09-09 15:31:24 +02:00
Luca Guerra
63784e06ef
new(falco): add json schema for append_output
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-09-09 15:31:24 +02:00
Luca Guerra
d210ed2e4f
new(app): add append_output configuration option with fields and format
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-09-09 15:31:24 +02:00
Federico Di Pierro
f3eecb6b21
new(userspace/falco): added --config-schema
action to print config schema.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-09-06 09:51:10 +02:00
Federico Di Pierro
dabfe0e154
cleanup(userspace/falco): drop deprecated -t,-T,-D options.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-09-06 09:26:10 +02:00
Luca Guerra
5b6810a51e
new(falco): enable -o key={object} configuration
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-09-06 09:25:11 +02:00
Melissa Kilby
8a3cb7608a
chore: updat config schema w/ container_engines
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 12:13:26 +02:00
Melissa Kilby
898e060544
chore: update desc in falco.yaml
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 12:13:26 +02:00
Melissa Kilby
08d5ac92ad
update(engine): move some contaienr engines debug message to init inspector
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 12:13:26 +02:00
Melissa Kilby
e8afcc55cc
update(engine): address reviewers comments wrt container_engines config
...
Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 12:13:26 +02:00
Melissa Kilby
f6ffa75d74
new(config): add container_engines config to falco.yaml
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 12:13:26 +02:00
Melissa Kilby
f8398213ba
update(metrics): always refresh ifinfo
...
Because libs constantly refreshes them, it's fine to re-create the JSON
each time
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 10:18:26 +02:00
Melissa Kilby
1caece2cf9
update(metrics): use new libs addr_to_string methods for host_ifinfo_json
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 10:18:26 +02:00
Melissa Kilby
23b412ea3c
new(metrics): add host_ifinfo metric
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-27 10:18:26 +02:00
Federico Di Pierro
db52442b3f
fix(userspace/falco): fixed windows build by enforcing NOMINMAX compile definition.
...
Also, minified config schema, since the big schema string leads to an MSVC compiler error.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
3fff994b19
chore(userspace/falco): include numeric header for std::accumulate.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
d1c715e7a8
chore(unit_tests,userspace): use nlhomann json instead of jsoncpp.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
be927edfe8
new(userspace/falco,unit_tests): added new tests around schema validation feature.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
94dc7da986
cleanup(unit_tests,userspace/falco): moved all config validation logic to be more testable.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
6dfdfdd649
chore(unit_tests): moved config_files and env vars config tests to their own source file.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
c807727475
chore(userspace/falco): use minProperties
where needed.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
5c551df116
new(userspace/falco): validate loaded configuration files against config schema.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 18:06:25 +02:00
Federico Di Pierro
4e45152521
fix(cmake,userspace/falco): bumped libs to latest master.
...
Also, fixes some newly introduced API breaks.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-08-26 15:51:25 +02:00
Luca Guerra
1886aca8b5
update(falco): update metrics interface
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-08-26 15:51:25 +02:00
Melissa Kilby
33a0d9c6ab
fix(metrics/prometheus): adopt best prometheus practices for rules counters and sha256 file metrics
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-08-05 11:39:40 +02:00
Federico Di Pierro
4a4ed1e118
update(userspace/engine): bump engine version and checksum.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-06-26 10:32:44 +02:00
Federico Di Pierro
24eec1e92a
update(cmake,userspace): bump libs and driver to latest master.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-06-26 10:32:44 +02:00
Mark Stemm
a3bf8b472b
If rule compilation fails, return immediately
...
There's no need to populate rulesets with the output if compilation
failed.
Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2024-06-25 18:27:39 +02:00
Mark Stemm
adeca79d1c
Modify evttype_index_ruleset to derive from indexable_ruleset
...
Modify evttype_index_ruleset to derive from indexable_ruleset instead
of having its own implementation of segregating filters by ruleset
id/event type.
An evttype_index_wrapper contains a falco rule and filter, and
implements the methods required by the template. run_wrappers()
evaluate the filter as before, without the segregation by ruleset
id/event type.
Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2024-06-20 11:23:12 +02:00
Mark Stemm
bbcfa61d82
Add an indexable ruleset that can split filters by ruleset/evttype
...
Now that custom rules loading implementations (and related, custom
rulesets) can be swapped into falco in a customizable way, there is
some functionality in evttype_index_ruleset that could be used by
other rulesets, specifically the part that segregates filters by
ruleset and enables/disables filters based on name substring + tags.
To allow for this, create a new template indexable_ruleset<class
filter_wrapper> which derives from filter_ruleset and segregates the
filter_wrappers by ruleset. It also optionally segregates
filter_wrappers by event type.
The filter_wrapper class is an object that can return a name, tags,
and sc/event codes.
The main interfaces for classes that derive from indexable_ruleset are:
- add_wrapper(), which provides a filter_wrapper to the
indexable_ruleset. This is generally called from
add()/add_compile_output(), which must be implemented by the derived class.
- run_wrappers(), which must be implemented by the derived class and
is called for event processing.
Most of the methods required by filter_ruleset are implemented by
indexable_ruleset and do not need to be implemented by the derived
class.
Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2024-06-20 11:23:12 +02:00
Gianmatteo Palmieri
3e91a27538
new(metrics): enable plugins metrics
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
Co-authored-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-06-13 16:32:48 +02:00
Federico Di Pierro
0e754aec14
chore(userspace): bump engine version and checksum.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-06-13 13:40:48 +02:00
Luca Guerra
b8e5e2e8dd
update(engine): allow using -p to pass a format to plugin events
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-06-11 09:19:39 +02:00
Luca Guerra
8a59cee355
cleanup(falco): clarify that --print variants only affect syscalls
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-06-06 09:46:22 +02:00
Gianmatteo Palmieri
1c66b640f2
Revert "fix(engine): apply output substitutions for all sources"
...
This reverts commit 4ef7c9553a
.
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-06-05 12:43:19 +02:00
Melissa Kilby
5777a44ca1
fix(metrics): fix sha256 metric names for prometheus
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-06-04 09:52:13 +02:00
Melissa Kilby
97207d309a
fix(metrics): allow each metric output channel to be selected independently
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-06-04 09:52:13 +02:00
Federico Di Pierro
6687d50fc2
chore(userspace/falco): more extra safety checks on stats collector too.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
Co-authored-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-06-03 15:56:14 +02:00
Federico Di Pierro
ae71cec507
fix(userspace/falco): fixed falco_metrics::to_text
implementation when running with plugins.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-06-03 15:56:14 +02:00
Jason Dellaluce
cd1c5f911c
refactor(userspace): move falco logger under falco engine
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-23 09:29:23 +02:00
Federico Di Pierro
a48965a00c
chore(userspace,falco.yaml,unit_tests): configs_files
-> config_files
.
...
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-20 16:33:11 +02:00
Melissa Kilby
0668c54485
cleanup(metrics): use sha26_rules (plural form) as naming
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-20 10:25:10 +02:00
Melissa Kilby
27bab30017
cleanup(metrics): add original rule name as label
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-20 10:25:10 +02:00
Melissa Kilby
c15a309781
clenaup: add sanitize_metric_name helper
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-17 14:54:58 +02:00
Melissa Kilby
e9afe24e17
cleanup(metrics): simplify some logic
...
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-17 14:54:58 +02:00
Melissa Kilby
aa021537d9
cleanup(metrics): improve comments
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-17 14:54:58 +02:00
Melissa Kilby
0195dba889
cleanup: add getter functions to stats_manager
...
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-17 14:54:58 +02:00
Melissa Kilby
b7adcd251d
new(metrics): add rules_counters_enabled option
...
Intended to replace https://github.com/falcosecurity/falco-exporter
when used with Prometheus output
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
2024-05-17 14:54:58 +02:00
Jason Dellaluce
e211e97e2a
fix(userspace/engine): make sure exception fields are not optional in replace mode
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-17 14:38:57 +02:00