Skip to content

Commit c7512e5

Browse files
committed
chore(falco): deprecated -A
Signed-off-by: Luca Guerra <[email protected]>
1 parent 474322d commit c7512e5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

userspace/falco/app/actions/configure_interesting_sets.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,19 @@ static void select_event_set(falco::app::state& s,
184184
concat_set_in_order(non_rules_sc_set_names) + "\n");
185185
}
186186

187-
/* -A flag behavior:
187+
/* base_syscall.all / -A flag behavior:
188188
* (1) default: all syscalls in rules included, sinsp state enforcement
189189
without high volume syscalls
190-
* (2) -A flag set: all syscalls in rules included, sinsp state enforcement
190+
* (2) set: all syscalls in rules included, sinsp state enforcement
191191
and allowing high volume syscalls */
192+
bool all_events = false;
193+
if(s.options.all_events) {
194+
falco_logger::log(falco_logger::level::WARNING, "The -A option is deprecated and will be removed. Use -o base_syscalls.all=true instead.");
195+
all_events = true;
196+
}
197+
if(s.config->m_base_syscalls_all) {
198+
all_events = true;
199+
}
192200
if(!(s.options.all_events || s.config->m_base_syscalls_all)) {
193201
auto ignored_sc_set = falco::app::ignored_sc_set();
194202
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
@@ -113,7 +113,7 @@ void options::define(cxxopts::Options& opts)
113113
#endif
114114
("config-schema", "Print the config json schema and exit.", cxxopts::value(print_config_schema)->default_value("false"))
115115
("rule-schema", "Print the rule json schema and exit.", cxxopts::value(print_rule_schema)->default_value("false"))
116-
("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"))
116+
("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"))
117117
("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.")
118118
#if !defined(_WIN32) && !defined(__EMSCRIPTEN__) && !defined(MINIMAL_BUILD)
119119
("cri", "DEPRECATED: use -o container_engines.cri.sockets[]=<socket_path> instead. Path to CRI socket for container metadata. Use the specified <path> to fetch data from a CRI-compatible runtime. If not specified, built-in defaults for commonly known paths are used. This option can be passed multiple times to specify a list of sockets to be tried until a successful one is found.", cxxopts::value(cri_socket_paths), "<path>")

0 commit comments

Comments
 (0)