Skip to content

Commit

Permalink
Improve BIMI advice
Browse files Browse the repository at this point in the history
  • Loading branch information
wolveix committed Dec 16, 2023
1 parent f8e311a commit 216bdbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/dss/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (
Use: "dss",
Short: "Scan a domain's DNS records.",
Long: "Scan a domain's DNS records.\nhttps://github.com/GlobalCyberAlliance/domain-security-scanner",
Version: "2.4.5",
Version: "2.4.6",
PersistentPreRun: func(cmd *cobra.Command, args []string) {
if debug {
log = zerolog.New(zerolog.ConsoleWriter{Out: os.Stdout, TimeFormat: time.RFC3339}).With().Timestamp().Logger().Level(zerolog.DebugLevel)
Expand Down
7 changes: 5 additions & 2 deletions pkg/advisor/advisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,13 @@ func (a *Advisor) CheckBIMI(bimi string) (advice []string) {
advice = append(advice, "Your BIMI record appears to be malformed as no semicolons seem to be present.")
}

if len(bimi) == 0 {
return []string{"Your BIMI record looks good! There's nothing more to do."}
if len(advice) == 0 {
return []string{"Your BIMI record looks good! No further action needed."}
}

// prepend a message detailing that the BIMI record has some issues
advice = append([]string{"Your BIMI record has some issues:"}, advice...)

return advice
}

Expand Down

0 comments on commit 216bdbe

Please sign in to comment.