create table from json cat vuln.json |jq -r '(["ID","NAME"] | (., map(length*"-"))), (.vulnerabilities[] | [.package_name,.package_path]) | @tsv' |column -ts $'\t' Get number of vulnerabilities from trivy JSON report ❯ trivy --version Version: 0.19.2 Vulnerability DB: Type: Light Version: 1 UpdatedAt: 2021-08-18 12:09:36.660946762 +0000 UTC NextUpdate: 2021-08-18 18:09:36.660945662 +0000 UTC DownloadedAt: 2021-08-18 18:08:11.3410535 +0000 UTC ❯ TRIVY_NEW_JSON_SCHEMA=true trivy image -f json -o result.json ubuntu:latest 2021-08-19T00:03:12.221+0530 INFO Detected OS: ubuntu 2021-08-19T00:03:12.222+0530 INFO Detecting Ubuntu vulnerabilities... 2021-08-19T00:03:12.222+0530 INFO Number of language-specific files: 0 ❯ jq -r '.Results[].Vulnerabilities[].Severity' result.json | uniq -c 25 LOW