File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,8 @@ const processLambda = function () {
406406const processReport = function ( ) {
407407 try {
408408 if ( cmdOPS === 'REPORT' ) {
409- utilities . printTableWithJSON ( securityReports . vulnerabilities . map ( ( v , idx ) => {
409+ const vulnerabilities = securityReports . vulnerabilities || [ ]
410+ utilities . printTableWithJSON ( vulnerabilities . map ( ( v , idx ) => {
410411 securityServerity . critical += v . severity == 'Critical' ? 1 : 0
411412 securityServerity . high += v . severity == 'High' ? 1 : 0
412413 securityServerity . medium += v . severity == 'Medium' ? 1 : 0
@@ -415,9 +416,9 @@ const processReport = function () {
415416 return {
416417 index : idx + 1 ,
417418 name : v . name . truncateLeft ( 30 ) ,
418- severity : v . severity ,
419- category : v . category ,
420- identifier : v . identifiers . map ( i => i . type == 'cwe' ? i . name : undefined ) . filter ( o => o ) ,
419+ severity : v . severity || '' ,
420+ category : v . category || '' ,
421+ identifier : ( v . identifiers || [ ] ) . map ( i => i . type == 'cwe' ? i . name : undefined ) . filter ( o => o ) ,
421422 location : v . location . file . truncateLeft ( 30 )
422423 }
423424 } ) )
You can’t perform that action at this time.
0 commit comments