Skip to content

Commit dfa6b9b

Browse files
LucaGuerrapoiana
authored andcommitted
chore(falco): deprecated -A
Signed-off-by: Luca Guerra <[email protected]>
1 parent 3b28450 commit dfa6b9b

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

userspace/falco/app/actions/configure_interesting_sets.cpp

+12-2
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,21 @@ static void select_event_set(falco::app::state& s,
200200
concat_set_in_order(non_rules_sc_set_names) + "\n");
201201
}
202202

203-
/* -A flag behavior:
203+
/* base_syscall.all / -A flag behavior:
204204
* (1) default: all syscalls in rules included, sinsp state enforcement
205205
without high volume syscalls
206-
* (2) -A flag set: all syscalls in rules included, sinsp state enforcement
206+
* (2) set: all syscalls in rules included, sinsp state enforcement
207207
and allowing high volume syscalls */
208+
bool all_events = false;
209+
if(s.options.all_events) {
210+
falco_logger::log(falco_logger::level::WARNING,
211+
"The -A option is deprecated and will be removed. Use -o "
212+
"base_syscalls.all=true instead.");
213+
all_events = true;
214+
}
215+
if(s.config->m_base_syscalls_all) {
216+
all_events = true;
217+
}
208218
if(!(s.options.all_events || s.config->m_base_syscalls_all)) {
209219
auto ignored_sc_set = falco::app::ignored_sc_set();
210220
auto erased_sc_set = s.selected_sc_set.intersect(ignored_sc_set);

userspace/falco/app/options.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void options::define(cxxopts::Options& opts)
104104
#endif
105105
("config-schema", "Print the config json schema and exit.", cxxopts::value(print_config_schema)->default_value("false"))
106106
("rule-schema", "Print the rule json schema and exit.", cxxopts::value(print_rule_schema)->default_value("false"))
107-
("A", "Monitor all events supported by Falco and defined in rules and configs. Some events are ignored by default when -A is not specified (the -i option lists these events ignored). Using -A can impact performance. This option has no effect when reproducing events from a capture file.", cxxopts::value(all_events)->default_value("false"))
107+
("A", "DEPRECATED: use -o base_syscalls.all=true instead. Monitor all events supported by Falco and defined in rules and configs. Some events are ignored by default when -A is not specified (the -i option lists these events ignored). Using -A can impact performance. This option has no effect when reproducing events from a capture file.", cxxopts::value(all_events)->default_value("false"))
108108
("b,print-base64", "Print data buffers in base64. This is useful for encoding binary data that needs to be used over media designed to consume this format.")
109109
("disable-source", "Turn off a specific <event_source>. By default, all loaded sources get enabled. Available sources are 'syscall' plus all sources defined by loaded plugins supporting the event sourcing capability. This option can be passed multiple times, but turning off all event sources simultaneously is not permitted. This option can not be mixed with --enable-source. This option has no effect when reproducing events from a capture file.", cxxopts::value(disable_sources), "<event_source>")
110110
("dry-run", "Run Falco without processing events. It can help check that the configuration and rules do not have any errors.", cxxopts::value(dry_run)->default_value("false"))

0 commit comments

Comments
 (0)