mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-03 15:46:33 +00:00
Skip output json format (#342)
* Add option to exclude output property in json fmt New falco.yaml option json_include_output_property controls where the formatted string "output" is included in the json object when json output is enabled. By default the string is included. * Add tests for new json output option New test sets json_include_output_property to false and then verifies that the json output does *not* contain the surrounding text "Warning an open...".
This commit is contained in:
@@ -88,7 +88,8 @@ void falco_engine::load_rules(const string &rules_content, bool verbose, bool al
|
||||
// formats.formatter is used, so we can unconditionally set
|
||||
// json_output to false.
|
||||
bool json_output = false;
|
||||
falco_formats::init(m_inspector, m_ls, json_output);
|
||||
bool json_include_output_property = false;
|
||||
falco_formats::init(m_inspector, m_ls, json_output, json_include_output_property);
|
||||
|
||||
m_rules->load_rules(rules_content, verbose, all_events, m_extra, m_replace_container_info, m_min_priority);
|
||||
}
|
||||
|
Reference in New Issue
Block a user