mirror of
https://github.com/falcosecurity/falco.git
synced 2025-10-21 19:44:57 +00:00
Allow any list/macro/rule to be overridden by a subsequent file. The persistent state that lives across invocations of load_rules are the 3 arrays ordered_{list,macro,rule}_names, which have the lists/macros/rules in the order in which they first appear, and tables {rules,macros,lists}_by_name, which maps from a name to a yaml object. With each call to load_rules, the set of loaded rules is reset and the state of expanded lists, compiled macros, compiled rules, and rule metadata are recreated from scratch, using the ordered_*_names arrays and *_by_name tables. That way, any list/macro/rule can be redefined in a subsequent file with new values.