checker: define Resolution verdict constants to make the collect/evaluate contract explicit
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
355f2b92eb
commit
62e85a155e
3 changed files with 23 additions and 12 deletions
|
|
@ -141,19 +141,19 @@ func evaluatePointer(pt *Pointer, whoisByRef map[string]*whoisFacts) []SignalTri
|
|||
var out []SignalTrigger
|
||||
|
||||
switch pt.Resolution {
|
||||
case "nxdomain":
|
||||
case ResolutionNXDomain:
|
||||
out = append(out, SignalTrigger{
|
||||
Rrtype: pt.Rrtype, Target: pt.Target,
|
||||
Reason: "Target does not resolve (NXDOMAIN). The record points at a host that no longer exists.",
|
||||
Detail: pt.ResolutionDetail, Severity: SeverityCrit,
|
||||
})
|
||||
case "servfail":
|
||||
case ResolutionServFail:
|
||||
out = append(out, SignalTrigger{
|
||||
Rrtype: pt.Rrtype, Target: pt.Target,
|
||||
Reason: "Target lookup returned SERVFAIL. The authoritative server may be misconfigured or the delegation broken.",
|
||||
Detail: pt.ResolutionDetail, Severity: SeverityWarn,
|
||||
})
|
||||
case "no_answer":
|
||||
case ResolutionNoAnswer:
|
||||
out = append(out, SignalTrigger{
|
||||
Rrtype: pt.Rrtype, Target: pt.Target,
|
||||
Reason: "Target resolves to no address (NOERROR with empty answer). Rarely the operator's intent for a pointer record.",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue