feat: webhook alerts for surface changes and Prometheus /metrics

[[webhook]] receivers get each ingested sweep's changes, filtered by kind
and group, as Xexéu JSON or a Slack/Discord message, optionally signed with
HMAC-SHA256 from an environment variable. Delivery runs in the background
with retries and never blocks ingestion. GET /api/config and the logs show
webhook URLs as scheme://host/… because chat webhook URLs are credentials.

/metrics exposes hosts, ports, findings by severity, feed state, per-group
last sweep and webhook delivery counters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Opus 5.5 committed 2026-11-03 11:06:45 -03:00
1 parent 8b6e0d4a3f
commit cd1f3d0e8c
17 files changed
+1158 -7

No files matched your search

+8
View File
@@ -56,3 +56,11 @@ alvos = ["10.0.1.1", "10.0.1.2", "10.0.1.10-10.0.1.20", "db01.interno.exemplo.or
cron = "0 3 * * *" # varredura completa (1-65535 + vulnerabilidades) às 03:00
perfil = "completo"
criticidade = "critica"
# Alertas: as mudanças de cada varredura vão para um webhook (veja docs/configuration.md).
# [[webhook]]
# url = "https://hooks.slack.com/services/T000/B000/XXXX"
# formato = "slack"
# eventos = ["host_novo", "porta_nova", "servico_alterado"]
# grupos = ["dmz", "nucleo"]
# segredo_env = "XEXEU_WEBHOOK_KEY"