Skip to content

Commit

Permalink
fix: Gitlab report broken after NVD api changes (#6166)
Browse files Browse the repository at this point in the history
  • Loading branch information
weyhmueller authored Nov 29, 2023
1 parent aec49c8 commit 355736f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private String determineScore(Vulnerability vuln) {
return "unknown";
}

private String normalizeSeverity(String sev) {
public String normalizeSeverity(String sev) {
switch (sev.toLowerCase()) {
case "critical":
return "critical";
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/templates/gitlabReport.vsl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
## optional properties
"name": "$enc.json($vulnerability.name)",
"description": "$enc.json($vulnerability.description)",
"severity": "$rpt.normalizeSeverity($vulnerability.cvssV3.getBaseSeverity().toLowerCase())",
"severity": "$rpt.normalizeSeverity($vulnerability.cvssV3.cvssData.baseSeverity).toLowerCase()",
## "solution": "" --> not implemented
"links": [
#foreach( $ref in $vulnerability.getReferences(true) )
Expand Down

0 comments on commit 355736f

Please sign in to comment.