Skip to content

Commit

Permalink
fix(report/email): add Critical to email summary (#1565)
Browse files Browse the repository at this point in the history
* Add criticals to email summary

* chore(report/email): add Critical keys

Co-authored-by: MaineK00n <mainek00n.1229@gmail.com>
  • Loading branch information
bprodoehl and MaineK00n authored Dec 20, 2022
1 parent f6cd4d9 commit 554ecc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reporter/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (w EMailWriter) Write(rs ...models.ScanResult) (err error) {
if w.FormatOneEMail {
message += formatFullPlainText(r) + "\r\n\r\n"
mm := r.ScannedCves.CountGroupBySeverity()
keys := []string{"High", "Medium", "Low", "Unknown"}
keys := []string{"Critical", "High", "Medium", "Low", "Unknown"}
for _, k := range keys {
m[k] += mm[k]
}
Expand Down Expand Up @@ -60,9 +60,9 @@ func (w EMailWriter) Write(rs ...models.ScanResult) (err error) {
}
}

summary := fmt.Sprintf("Total: %d (High:%d Medium:%d Low:%d ?:%d)",
m["High"]+m["Medium"]+m["Low"]+m["Unknown"],
m["High"], m["Medium"], m["Low"], m["Unknown"])
summary := fmt.Sprintf("Total: %d (Critical:%d High:%d Medium:%d Low:%d ?:%d)",
m["Critical"]+m["High"]+m["Medium"]+m["Low"]+m["Unknown"],
m["Critical"], m["High"], m["Medium"], m["Low"], m["Unknown"])

origmessage := message
if w.FormatOneEMail {
Expand Down

0 comments on commit 554ecc4

Please sign in to comment.