Распарсить sql поле в YML файлах и понять какие поля в sql встречаются чаще всего

Добрый день.

Нужно из гитхаба распарсить yml файлы с полем query.

И в поле query распарсить поля в запросе со значениями и сагрегировать какие поля встречаются чаще всего

https://github.com/elastic/detection-rules/blob/main/rules/linux/command_and_control_linux_kworker_netcon.toml

query = '''host.os.type:linux and event.category:network and event.action:(connection_attempted or connection_accepted) and process.name:kworker* and not destination.ip:( 10.0.0.0/8 or 127.0.0.0/8 or 169.254.0.0/16 or 172.16.0.0/12 or 192.168.0.0/16 or 224.0.0.0/4 or "::1" or
"FE80::/10" or
"FF00::/8") and not destination.port:2049'''

Читайте на 123ru.net