Initial commit
This commit is contained in:
parent
b97f30faf4
commit
c1020c8be7
16 changed files with 118 additions and 209 deletions
|
|
@ -1,9 +1,3 @@
|
|||
// This file is part of the happyDomain (R) project.
|
||||
// Copyright (c) 2026 happyDomain
|
||||
// Authors: Pierre-Olivier Mercier, et al.
|
||||
//
|
||||
// Licensed under the MIT License (see LICENSE).
|
||||
|
||||
package checker
|
||||
|
||||
import (
|
||||
|
|
@ -32,9 +26,9 @@ import (
|
|||
|
||||
// serviceBody is the common envelope for the two services.
|
||||
type serviceBody struct {
|
||||
Username string `json:"username,omitempty"`
|
||||
OpenPGP *dns.OPENPGPKEY `json:"openpgpkey,omitempty"`
|
||||
SMIMEA *dns.SMIMEA `json:"smimea,omitempty"`
|
||||
Username string `json:"username,omitempty"`
|
||||
OpenPGP *dns.OPENPGPKEY `json:"openpgpkey,omitempty"`
|
||||
SMIMEA *dns.SMIMEA `json:"smimea,omitempty"`
|
||||
}
|
||||
|
||||
// Collect runs the full DANE-email testsuite and returns an *EmailKeyData
|
||||
|
|
@ -123,13 +117,9 @@ func (p *emailKeyProvider) Collect(ctx context.Context, opts sdk.CheckerOptions)
|
|||
data.RecordCount = len(ans.Records)
|
||||
|
||||
if ans.Rcode == dns.RcodeNameError || len(ans.Records) == 0 {
|
||||
sev := SeverityCrit
|
||||
if ans.Rcode == dns.RcodeNameError {
|
||||
sev = SeverityCrit
|
||||
}
|
||||
data.Findings = append(data.Findings, Finding{
|
||||
Code: CodeDNSNoRecord,
|
||||
Severity: sev,
|
||||
Severity: SeverityCrit,
|
||||
Message: fmt.Sprintf("Authoritative DNS returned no %s record at %s.", dns.TypeToString[qtype], data.QueriedOwner),
|
||||
Fix: "Ensure the record is present in the zone and that the zone has been loaded by the authoritative servers.",
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue