Spots

GitHub - xuxu298/rule-doctor-lite: Free read-only check: which custom Wazuh…

A free, read-only check for Wazuh 4.x. It lists every custom rule that did not fire and tells you the most likely reason, including rules that Wazuh silently threw away while loading them.

One Python 3 file, standard library only. It

One Python 3 file, standard library only. It reads files; it changes nothing on your manager and sends nothing anywhere. Or from PyPI (same file, with a rule-doctor-lite command): Manager in docker? Copy the four things it reads, then point --ossec-dir at the copy: The shadowed / never-reaches-the-manager / no-match split is Kislley Rodrigues's.

Every result is printed with the time window

Every result is printed with the time window it was measured over. A rule written for a quarterly event is not dead after a day.

What it reads by default (0.2.1): the current

What it reads by default (0.2.1): the current logs/alerts/alerts.json plus the rotated alert files of the last 7 days (logs/alerts/<year>/<Mon>/ossec-alerts-<dd>.json, plain or .gz, as Wazuh writes them); change the window with --days N. From ossec.log it takes the 7617/7619 warnings of the latest rule load only (the block before the last Total rules enabled), so a rule you already fixed is not reported from an older load, and lines from wazuh-analysisd -t are ignored.

wazuh/wazuh-manager:4.14.7, 27/09/2026. Two identical custom rules on if_sid

wazuh/wazuh-manager:4.14.7, 27/09/2026. Two identical custom rules on if_sid 5715, one in 0094-test.xml (sorts before the stock 0095-sshd_rules.xml), one in 0500-ok.xml. A real sshd "Accepted password" event fired 100081 from 0500-ok.xml; 100080 in 0094-test.xml never fired. Rule Doctor Lite reported: and, with ossec.log withheld, the same verdict from the load order alone: Chains (0.2.0, 28/09/2026)

Same image. Anchor 910010 on if_sid 5715 in

Same image. Anchor 910010 on if_sid 5715 in 0094-early.xml, child 910012 on if_sid 910010 and grandchild 910013 on if_sid 910012 in 0500-chain.xml. wazuh-analysisd -t exited 0; ossec.log had 7617 + 7619 for all three, each naming the rule above it as the missing parent. Lite, with ossec.log withheld:

The prediction matters because ossec.log can miss warnings

The prediction matters because ossec.log can miss warnings: analysisd buffers the warnings of each rules file in a list capped at 50 (ERRORLIST_MAXSIZE) and flushes it after the file, so a file that produces more than 50 warnings loses the oldest ones (src/analysisd/analysisd.c L708-750 on v4.14.7). tests/run.sh runs the fixture checks without docker.

Wazuh 4.x rule syntax. Only if_sid parents are

Wazuh 4.x rule syntax. Only if_sid parents are read; if_group, if_matched_sid and if_matched_group are not followed yet. NEVER-REACHES-MANAGER only sees loss that raised rule 203 or 204 (see the table above). SHADOW-CANDIDATE needs a replay to confirm or clear. Lite does not replay. "Never fired" means never fired in the alerts it read (7 days by default). Older alerts need --days or --alerts.

Step-by-step notes for what Lite points at, each

Step-by-step notes for what Lite points at, each with a one-minute check you can run yourself (measured on Wazuh 4.14.7): Full version and done-for-you fixes

ATK Rule Doctor (USD 490 per cluster per

ATK Rule Doctor (USD 490 per cluster per year) replays the real events behind every SHADOW-CANDIDATE through a throwaway manager of your version to confirm or clear it, and fixes alerts the indexer rejects with mapper_parsing_exception: https://vct.atkvn.com/rule-doctor.html

News

GitHub - xuxu298/rule-doctor-lite: Free read-only check: which custom Wazuh rules never fire, and why (including rules Wazuh drops at load).

A free, read-only check for Wazuh 4.x.

@spots #dev
Source: Show HN
See more like this