@@ -35,20 +35,21 @@ async function updateScanStatus(findings) {
3535 scanName ,
3636 {
3737 status : {
38- findingCount : findings . length ,
39- findingSeverities : {
40- informationalCount : severityCount ( findings , 'INFORMATIONAL' ) ,
41- lowCount : severityCount ( findings , 'LOW' ) ,
42- mediumCount : severityCount ( findings , 'MEDIUM' ) ,
43- highCount : severityCount ( findings , 'HIGH' ) ,
38+ findings : {
39+ count : findings . length ,
40+ severities : {
41+ informational : severityCount ( findings , 'INFORMATIONAL' ) ,
42+ low : severityCount ( findings , 'LOW' ) ,
43+ medium : severityCount ( findings , 'MEDIUM' ) ,
44+ high : severityCount ( findings , 'HIGH' ) ,
45+ } ,
46+ categories : Object . fromEntries ( findingCategories . entries ( ) ) ,
4447 } ,
45- findingCategories : Object . fromEntries ( findingCategories . entries ( ) ) ,
4648 } ,
4749 } ,
4850 { headers : { 'content-type' : 'application/merge-patch+json' } }
4951 ) ;
5052 console . log ( 'Updated status successfully' ) ;
51- // console.log(res);
5253 } catch ( err ) {
5354 console . error ( 'Failed to update Scan Status via the kubernetes api' ) ;
5455 console . error ( err ) ;
0 commit comments