Display findings

const fs = require("fs")
let semgrepReport = fs.readFileSync("./semgrep.gl-sast-report.json", "utf8")
let semgrepResults = JSON.parse(semgrepReport)

//console.log(process.env["CI_MERGE_REQUEST_IID"], process.env["CI_MERGE_REQUEST_ID"])

console.log("### Vulnerability report")

semgrepResults.vulnerabilities.forEach(finding => {

  console.log("- 🐞 (", finding.category, ") name:", finding.name, "details:", finding.message)
  console.log("  - location:", finding.location.file, "at:", finding.location.start_line)
})