Skip to content

Commit

Permalink
use JSON.stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
bryankaraffa authored and alexjurkiewicz committed Sep 24, 2021
1 parent d10ba53 commit ba3da31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const main = async () => {
}

const ignoredCounts = countIgnoredFindings(ignoredFindings)
const findings_details = findings.imageScanFindings.findings || new Array()
const findings_details = findings.imageScanFindings.findings || []
const counts = findings.imageScanFindings.findingSeverityCounts
const critical = counts.CRITICAL || 0
const high = counts.HIGH || 0
Expand All @@ -229,7 +229,7 @@ const main = async () => {
core.setOutput('ignored', ignored.toString())
core.setOutput('total', total.toString())
console.log('Findings:');
console.log(findings_details.toString())
console.log(JSON.stringify(findings_details))
console.log('Vulnerabilities found:')
console.log(`${critical.toString().padStart(3, ' ')} Critical ${getCount('critical', ignoredCounts)}`)
console.log(`${high.toString().padStart(3, ' ')} High ${getCount('high', ignoredCounts)}`)
Expand Down

0 comments on commit ba3da31

Please sign in to comment.