Skip to content

Commit 0639239

Browse files
authored
Merge pull request #79 from devtron-labs/fix-notification-vulnerability
fix: parsing critical vulnerability
2 parents 10dee8c + 6dbecc8 commit 0639239

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/common/mustacheHelper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@ export class MustacheHelper {
320320
mapSeverityCount(imageScanExecutionInfo:any):severityCount | {} {
321321
if (imageScanExecutionInfo && imageScanExecutionInfo.severityCount){
322322
return {
323+
critical: imageScanExecutionInfo.severityCount.critical,
323324
high: imageScanExecutionInfo.severityCount.high,
324-
moderate: imageScanExecutionInfo.severityCount.moderate,
325+
medium: imageScanExecutionInfo.severityCount.medium,
325326
low: imageScanExecutionInfo.severityCount.low,
326327
}
327328
} else{

src/common/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ export interface vulnerability {
4848
permission: string;
4949
}
5050
export interface severityCount {
51+
critical: number;
5152
high: number;
52-
moderate: number;
53+
medium: number;
5354
low: number;
54-
}
55+
}
5556
export interface WebhookParsedEvent {
5657
eventType?: string;
5758
devtronAppId?: number;

0 commit comments

Comments
 (0)