Created
April 29, 2019 15:05
-
-
Save tdshipley/e7855c7517be9dba4e488bdf325660bd to your computer and use it in GitHub Desktop.
OWASP Glue Change Dependency Checker JSON output To Dynamic Compatible Version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq '{ | |
alerts: | |
[ .dependencies | | |
map(select(.vulnerabilities != null)) | | |
.[] | | |
. as $raw | | |
$raw | | |
$raw.vulnerabilities | | |
. as $vuln | | |
{ | |
description: "OWASP Dep. Check Vulnerable Dependency: \($raw.fileName)", | |
source:"\([$raw.projectReferences[]] | join(", "))", | |
detail: "Vulnerabilities Found: \n \(["\n\nVulnerability: \n " + $vuln[].name] | join(","))", | |
"severity": $vuln[0].severity, | |
"fingerprint": "\($raw.fileName)_\($raw.md5)"} ] | |
}' dependency-check-report.json > dependency-check-report-flat.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment