Hi,
Let me address each of your points one by one.
a) Processing order
You are close, but the normalization step does not occur before rule evaluation. The processing flow is:
Raw log → manager receives the event → decoder parses fields → rule engine evaluates rules → alert generated → alert written to alerts.json → Filebeat reads alerts.json or archives → ingest pipeline performs mappings (for example, adding Elastic Common Schema (ECS) fields) → alert indexed in Elasticsearch/OpenSearch → visualization in the Wazuh dashboard.
Because of this sequence, the rule engine evaluates rules before any ECS normalization. Wazuh rules work on fields extracted by the decoder, or they can use <match> and <regex> conditions that do not require decoded fields.
b) Adding ECS normalization with Logstash or Filebeat before Wazuh
Default rules using <match> or <regex> generally continue to work because they match the raw log text rather than specific decoded fields.
Custom rules that depend on specific fields (for example, <field name="win.eventdata.commandLine">) may stop working if the ECS pipeline renames or modifies those fields. Decoders may also need adjustments if the log format changes before reaching Wazuh.
Because of this, some custom rules or decoders may need to be updated to match the new field names or structure. If ECS normalization happens before the event reaches Wazuh, field-based rules can indeed be affected.
c) pySigma pipeline for Wazuh
Currently, there is no official PySigma pipeline specifically designed for ECS-normalized Wazuh environments maintained by Wazuh. Sigma support has been discussed but is not implemented as a built-in feature. This topic is tracked here: https://github.com/wazuh/wazuh/issues/15451
d) Migrating rules when the normalization schema changes
There is no built-in method to automatically migrate rules if field names change. If the normalization schema changes (for example moving to ECS field names), the common approach is to update rules manually or with scripts. steps are:
Maintain a field mapping table (old field → new field).
Back up the default rules and decoders.
Update the field names in the rules (manually or using scripts).
Test the updated rules using wazuh-logtest before restarting the manager.
Custom rules referencing renamed fields usually need to be updated.
e) Self-discovering field mapping
I’m not aware of any maintained tool that automatically discovers the field schema from live Wazuh alerts and generates a pySigma mapping pipeline. In most cases, the field mappings are defined manually. Some projects attempt Sigma-to-Wazuh conversion, such as the https://github.com/theflakes/sigma_to_wazuh repository, but these are not official and usually require manual adjustments.
These are not official and usually require manual adjustments.
f) Mapping Sigma severity to Wazuh rule levels
There is no strict standard mapping between Sigma severity levels and Wazuh rule levels. When Sigma rules are converted, the severity is usually mapped to the Wazuh rule level (0–15) using a custom mapping defined in the conversion workflow. This mapping is usually configurable in the rule generation pipeline.
g) Handling if_sid in converted rules
Many Sigma conversions do not automatically include if_sid. In Wazuh, if_sid is a parent rule. If you want that behavior in generated rules, it usually needs to be added through customization in the backend pipeline. For example, the https://github.com/theflakes/sigma_to_wazuh/blob/main/get-wazuh_rule_info.py script in the sigma-to-Wazuh converter generates a report of rule IDs, fields, and rule dependencies to help determine where if_sid may be required.
h) Testing converted rules
Usually, the wazuh-logtest tool is used to test the rules and decoders in wazuh. This lets you send a sample log and see which decoder and rule will match before deploying the rule. In some unofficial setups, tools like Chainsaw are used to run Sigma detections on event logs and then send the results to Wazuh for alerting. https://socfortress.medium.com/wazuh-and-chainsaw-integration-for-near-real-time-sigma-detection-6f3e729e892
i) Sigma rules that cannot be converted
Sigma rules that cannot be converted: I’m not very familiar with the Sigma rule conversion limitations, so I cannot give a detailed list of which Sigma conditions are supported or unsupported when converting to Wazuh rules. In general, when a Sigma rule cannot be converted automatically (for example, due to unsupported conditions or log sources), it usually needs to be reviewed and adjusted manually. Some tools attempt to convert Sigma rules to Wazuh rules, but they may skip rules or require manual fixes depending on the detection logic.
One thing to keep in mind is that the detection logic in Sigma can sometimes be more complex than what Wazuh rules support, so automatic conversion may still need some manual adjustments. You refer to the unofficial documents:
https://medium.com/@omvecg/step-by-step-guide-soc-home-lab-with-wazuh-sigma-rules-397a8936cc9e
https://socfortress.medium.com/wazuh-and-chainsaw-integration-for-near-real-time-sigma-detection-6f3e729e892
https://www.linkedin.com/posts/mariskarthickm_cybersecurity-threatdetection-sigmarules-activity-7299219519477104640-KDfR/
Let me know if you need any further help.