Add a score to DNS
This commit is contained in:
parent
fdb43533cd
commit
abfd1f0155
6 changed files with 143 additions and 5 deletions
|
|
@ -95,6 +95,11 @@ func (r *ReportGenerator) GenerateReport(testID uuid.UUID, results *AnalysisResu
|
|||
}
|
||||
|
||||
// Calculate scores directly from analyzers (no more checks array)
|
||||
dnsScore := 0
|
||||
if results.DNS != nil {
|
||||
dnsScore = r.dnsAnalyzer.CalculateDNSScore(results.DNS)
|
||||
}
|
||||
|
||||
authScore := 0
|
||||
if results.Authentication != nil {
|
||||
authScore = r.authAnalyzer.CalculateAuthenticationScore(results.Authentication)
|
||||
|
|
@ -121,6 +126,7 @@ func (r *ReportGenerator) GenerateReport(testID uuid.UUID, results *AnalysisResu
|
|||
}
|
||||
|
||||
report.Summary = &api.ScoreSummary{
|
||||
DnsScore: dnsScore,
|
||||
AuthenticationScore: authScore,
|
||||
BlacklistScore: blacklistScore,
|
||||
ContentScore: contentScore,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue