Skip to content

Commit

Permalink
Merge pull request #36 from bmrvilela/master
Browse files Browse the repository at this point in the history
Added Critical severity to enumerators
  • Loading branch information
portilha authored Nov 4, 2024
2 parents be0538f + 87af8f2 commit 6b6a693
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public enum Severity
Info = 0,
Low = 1,
Medium = 2,
High = 3
High = 3,
Critical = 4
}
}
8 changes: 7 additions & 1 deletion Checkmarx.API/CxClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3818,7 +3818,8 @@ public enum Severity
Info = 0,
Low = 1,
Medium = 2,
High = 3
High = 3,
Critical = 4
}


Expand Down Expand Up @@ -3876,6 +3877,8 @@ public static string toSeverityToString(int severity)
return "Medium";
case 3:
return "High";
case 4:
return "Critical";
default:
throw new NotImplementedException();
}
Expand Down Expand Up @@ -3956,6 +3959,9 @@ public CxAuditWebServiceV9.FileExtension[] GetSupportedFileFormats()

Dictionary<CxDataRepository.Severity, int> dic = queryDic.GroupBy(x => x.Value).ToDictionary(x => x.Key, y => y.Count());

if (!dic.ContainsKey(CxDataRepository.Severity.Critical))
dic.Add(CxDataRepository.Severity.Critical, 0);

if (!dic.ContainsKey(CxDataRepository.Severity.High))
dic.Add(CxDataRepository.Severity.High, 0);

Expand Down
4 changes: 4 additions & 0 deletions Checkmarx.API/SAST/SASTResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class SASTResults

public int Loc { get; set; }

public uint Critical { get; set; }

public uint High { get; set; }

public uint Medium { get; set; }
Expand All @@ -22,6 +24,8 @@ public class SASTResults

public uint Info { get; set; }

public uint CriticalToVerify { get; set; }

public uint HighToVerify { get; set; }

public uint MediumToVerify { get; set; }
Expand Down

0 comments on commit 6b6a693

Please sign in to comment.