Skip to content

Commit

Permalink
Merge pull request #67 from deepfence/abhishek
Browse files Browse the repository at this point in the history
Added Unknown Severity for Standalone run
  • Loading branch information
akumars1 authored Mar 20, 2024
2 parents eca7ba7 + 757281f commit d6272c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions output/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,10 @@ func CountBySeverity(report *[]scanner.VulnerabilityScanReport) *VulnerabilitySc
detail.Severity.Medium += 1
case utils.LOW:
detail.Severity.Low += 1
case utils.UNKNOWN:
detail.Severity.Unknown += 1
}

}

detail.CveScore = math.Min((cveScore*10.0)/500.0, 10.0)
Expand Down
1 change: 1 addition & 0 deletions output/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type VulnerabilityScanDetail struct {
High int `json:"high,omitempty"`
Medium int `json:"medium,omitempty"`
Low int `json:"low,omitempty"`
Unknown int `json:"unknown,omitempty"`
} `json:"severity,omitempty"`
TimeStamp time.Time `json:"time_stamp,omitempty"`
Total int `json:"total,omitempty"`
Expand Down
3 changes: 2 additions & 1 deletion run-once.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ func RunOnce(config utils.Config) {
utils.CRITICAL, details.Severity.Critical,
utils.HIGH, details.Severity.High,
utils.MEDIUM, details.Severity.Medium,
utils.LOW, details.Severity.Low)
utils.LOW, details.Severity.Low,
utils.UNKNOWN, details.Severity.Unknown)
if len(exploitable) > 0 {
fmt.Println("\nMost Exploitable Vulnerabilities:")
_ = out.TableOutput(&exploitable)
Expand Down

0 comments on commit d6272c6

Please sign in to comment.