How j0rdan-m/breachnotifier works
BreachNotifier periodically checks configured email addresses for breaches, filters results against persisted state, then logs and optionally notifies about new compromises. Configuration selects the checker, logger, and notifier implementations; the documented integrations include LeakCheck, Wazuh, and TheHive. The graph reflects the orchestration and calls visible in the excerpts. The ELK implementation is included as a documented selectable logger, but its behavior was not sampled.
Main entry points: main.go Monitor runner · logger/factory.go Logger factory · checker/factory.go Checker factory · leakcheck_checker.go LeakCheck client
Components 17
Monitoring flow
- Monitor runner
main.go
Configuration and state
- YAML configuration
config/config.go - Breach state
config/state.go
Breach checking
- Checker factory
checker/factory.go - Checker contract
checker/checker.go - LeakCheck client
checker/leakcheck_checker.go
Logging
- Logger factory
logger/factory.go - Wazuh logger
logger/wazuh_logger.go - ELK logger
logger/elk_logger.go - Log contract
logger/logger.go
Notifications
- Notifier factory
notifier/factory.go - Notification contract
notifier/notifier.go - TheHive client
notifier/thehive_notifier.go
Other components
- Operator
- LeakCheck API
- JSON log file
- TheHive
Connections 16
- Operator → Monitor runner: runs
README.md - Monitor runner → YAML configuration: loads settings
main.go - Monitor runner → Breach state: loads and saves
main.go - Monitor runner → Checker factory: selects checker
main.go - Checker factory → LeakCheck client: creates
checker/factory.go - LeakCheck client → LeakCheck API: checks email
checker/leakcheck_checker.go - Monitor runner → Breach state: filters new sources
main.go - Monitor runner → Logger factory: selects logger
main.go - Logger factory → Wazuh logger: creates
logger/factory.go - Logger factory → ELK logger: creates
logger/factory.go - Monitor runner → Log contract: writes new breaches
main.go - Wazuh logger → JSON log file: appends JSON
logger/wazuh_logger.go - Monitor runner → Notifier factory: selects notifier
main.go - Notifier factory → TheHive client: creates
notifier/factory.go - Monitor runner → Notification contract: sends new breaches
main.go - TheHive client → TheHive: posts alerts
notifier/thehive_notifier.go