analyzer: correct auth scoring weights, x-aligned-from penalty, and RBL divide-by-zero

This commit is contained in:
nemunaire 2026-05-18 16:51:30 +08:00
commit 369a13526f
5 changed files with 15 additions and 17 deletions

View file

@ -51,16 +51,16 @@ func (a *AuthenticationAnalyzer) calculateXAlignedFromScore(results *model.Authe
if results.XAlignedFrom != nil {
switch results.XAlignedFrom.Result {
case model.AuthResultResultPass:
// pass: positive contribution
return 100
// pass: no impact
return 0
case model.AuthResultResultFail:
// fail: negative contribution
return 0
return -100
default:
// neutral, none, etc.: no impact
return 0
}
}
return 100
return 0
}