Dear Wazuh Support Team,
I am writing to seek your technical expertise in resolving two critical issues we are currently experiencing with our Wazuh configuration regarding Imperva SecureSphere logs.
1. Rule Validation Error (Invalid Field/Action Tag) We are encountering errors in rule 100031 concerning the <field> and <action> tags. The system indicates that these tags must be static and independent.
Current state: <field name="action">Block</field>
Proposed fix: We intend to change this to <action type="pcre2">^Block(ed)?|None$</action> to ensure comprehensive capture of all relevant values. Could you confirm if this is the correct approach to resolve the tag validation error?
2. Decoder Priority and Conflict Resolution We are facing a persistent issue where Imperva logs are being incorrectly parsed by the Trend Micro decoder instead of our custom Imperva decoder.
The Problem: Our system incorrectly defaults to the cef_trend_micro decoder because it matches any log containing the "CEF" string, effectively preempting our custom Imperva decoder regardless of other settings.
Proposed Custom Decoder Structure: We have attempted to implement the following structure:
imperva-securesphere (using <prematch> for CEF: 0|Imperva Inc.|SecureSphere|)
Followed by child decoders using parent tags to extract specific fields via PCRE2 regex.
<decoder name="imperva-securesphere">
<prematch>CEF:\s*0\|Imperva Inc\.\|SecureSphere\|</prematch>
</decoder>
<decoder name="imperva-securesphere-fields">
<parent>imperva-securesphere</parent>
<regex type="pcre2">^13\.5\.0\|([^|]+)\|([^|]+)\|([^|]+)\|</regex>
<order>imperva.version, imperva.signature_type, imperva.event_name, imperva.severity</order>
</decoder>
<decoder name="imperva-securesphere-fields">
<parent>imperva-securesphere</parent>
<regex type="pcre2">act=(\S+).*?dst=(\d{1,3}(?:\.\d{1,3}){3})\s+dpt=(\d+)\s+duser=\S+\s+src=(\d{1,3}(?:\.\d{1,3}){3})\s+spt=(\d+)\s+proto=(\S+)</regex>
<order>action, dstip, dstport, srcip, srcport, protocol</order>
</decoder>
The Obstacle: Even after configuring this, the system continues to hit the Trend Micro decoder first. Even with the allow_override parameter, we are unable to force the system to prioritize our Imperva-specific decoder.
Could you provide guidance on how to correctly prioritize the Imperva decoder over the generic Trend Micro decoder when both encounter "CEF" logs? Furthermore, we are concerned that our current approach to splitting decoders by header, network, and policy may lead to data loss due to Wazuh's sequential decoding logic. What is the recommended best practice for defining hierarchical decoders to ensure data integrity without triggering premature matches?
Thank you for your time and assistance in resolving these configuration challenges. We look forward to your expert advice.
Best regards,
Richard

Rule error 100031 with the field tag: the action tag must be static – independent. Resolution approach:
Change to:
to capture all possible values.
Error 2: The system does not prioritize reading the Imperva decoder file first, so the CEF log format is by default read as a Trend Micro log.
In addition, dividing the decoder into header, network, and policy carries the risk of data loss after decoding, which renders the written rules useless. This is due to the principle of how Wazuh scans decoders: once a decoder has been scanned and matched, the subsequent decoders are automatically skipped.
Resolution approach:

