Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make reachability human friendly
At the moment, the output shows reachability as function or package or with no info. This change makes this to more friendly / easier to understand: reachable/ potentially-reachable / no-info
- Loading branch information
Showing
4 changed files
with
262 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
194 changes: 194 additions & 0 deletions
194
test/acceptance/workspaces/reachable-vulns/maven/test-dep-graph-response-reachable.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
{ | ||
"vulnerabilities": [ | ||
{ | ||
"CVSSv3": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L", | ||
"alternativeIds": [], | ||
"creationTime": "2017-04-13T12:32:00Z", | ||
"credit": ["Package level Reachability"], | ||
"cvssScore": 5.6, | ||
"description": "Package level Reachability", | ||
"disclosureTime": "2014-04-23T12:32:00Z", | ||
"exploit": "Not Defined", | ||
"fixedIn": ["1.4.11", "1.5.6", "1.6.3", "1.7.1"], | ||
"functions": [], | ||
"functions_new": [ | ||
{ | ||
"functionId": { | ||
"filePath": "lib/file.js", | ||
"functionName": "theFunctionName" | ||
}, | ||
"version": [ | ||
"<0.0.19" | ||
] | ||
} | ||
], | ||
"id": "SNYK-JAVA-PACAKGE-12345", | ||
"identifiers": { | ||
"CVE": ["CVE-2014-0472"], | ||
"CWE": ["CWE-94"] | ||
}, | ||
"language": "java", | ||
"modificationTime": "2019-07-11T13:26:49.758445Z", | ||
"moduleName": "package-name", | ||
"packageManager": "maven", | ||
"packageName": "package-name", | ||
"patches": [], | ||
"publicationTime": "2014-04-23T12:32:00Z", | ||
"reachability": "package", | ||
"references": [ | ||
{ | ||
"title": "Vulnerability Description", | ||
"url": "https://www.url.com/page.html" | ||
} | ||
], | ||
"semver": { | ||
"vulnerable": ["[,1.4.11)", "[1.5,1.5.6)", "[1.6,1.6.3)", "[1.7,1.7.1)"] | ||
}, | ||
"severity": "medium", | ||
"title": "Arbitrary Code Execution", | ||
"from": ["root@0.0.0", "package-name@1.6.1"], | ||
"upgradePath": [], | ||
"isUpgradable": true, | ||
"isPatchable": false, | ||
"name": "package-name", | ||
"version": "1.6.1" | ||
}, | ||
{ | ||
"CVSSv3": "CVSS:56565656", | ||
"alternativeIds": [], | ||
"creationTime": "2017-04-13T12:32:00Z", | ||
"credit": ["No Info on Reachability"], | ||
"cvssScore": 5.6, | ||
"description": "No Info on Reachability", | ||
"disclosureTime": "2014-04-23T12:32:00Z", | ||
"exploit": "Not Defined", | ||
"fixedIn": ["1.4.11", "1.5.6", "1.6.3", "1.7.1"], | ||
"functions": [], | ||
"functions_new": [ | ||
{ | ||
"functionId": { | ||
"filePath": "lib/file.js", | ||
"functionName": "theFunctionName" | ||
}, | ||
"version": [ | ||
"<0.0.19" | ||
] | ||
} | ||
], | ||
"id": "SNYK-JAVA-PACAKGE-987765", | ||
"identifiers": { | ||
"CVE": ["CVE-2014-0472"], | ||
"CWE": ["CWE-94"] | ||
}, | ||
"language": "java", | ||
"modificationTime": "2019-07-11T13:26:49.758445Z", | ||
"moduleName": "package-name", | ||
"packageManager": "maven", | ||
"packageName": "package-name", | ||
"patches": [], | ||
"publicationTime": "2014-04-23T12:32:00Z", | ||
"reachability": "no-info", | ||
"references": [ | ||
{ | ||
"title": "Vulnerability Description", | ||
"url": "https://www.url.com/page.html" | ||
} | ||
], | ||
"semver": { | ||
"vulnerable": ["[,1.4.11)", "[1.5,1.5.6)", "[1.6,1.6.3)", "[1.7,1.7.1)"] | ||
}, | ||
"severity": "medium", | ||
"title": "Arbitrary Code Execution", | ||
"from": ["root@0.0.0", "package-name@1.6.1"], | ||
"upgradePath": [], | ||
"isUpgradable": true, | ||
"isPatchable": false, | ||
"name": "package-name", | ||
"version": "1.6.1" | ||
}, | ||
{ | ||
"CVSSv3": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L", | ||
"alternativeIds": [], | ||
"creationTime": "2017-04-13T12:32:00Z", | ||
"credit": ["Function level Reachability"], | ||
"cvssScore": 5.6, | ||
"description": "Function level Reachability", | ||
"disclosureTime": "2014-04-23T12:32:00Z", | ||
"exploit": "Not Defined", | ||
"fixedIn": ["1.4.11", "1.5.6", "1.6.3", "1.7.1"], | ||
"functions": [], | ||
"functions_new": [ | ||
{ | ||
"functionId": { | ||
"filePath": "lib/file.js", | ||
"functionName": "theFunctionName" | ||
}, | ||
"version": [ | ||
"<0.0.19" | ||
] | ||
} | ||
], | ||
"id": "SNYK-JAVA-PACAKGE-1029384", | ||
"identifiers": { | ||
"CVE": ["CVE-2014-0472"], | ||
"CWE": ["CWE-94"] | ||
}, | ||
"language": "java", | ||
"modificationTime": "2019-07-11T13:26:49.758445Z", | ||
"moduleName": "package-name", | ||
"packageManager": "maven", | ||
"packageName": "package-name", | ||
"patches": [], | ||
"publicationTime": "2014-04-23T12:32:00Z", | ||
"reachability": "function", | ||
"references": [ | ||
{ | ||
"title": "Vulnerability Description", | ||
"url": "https://www.url.com/page.html" | ||
} | ||
], | ||
"semver": { | ||
"vulnerable": ["[,1.4.11)", "[1.5,1.5.6)", "[1.6,1.6.3)", "[1.7,1.7.1)"] | ||
}, | ||
"severity": "medium", | ||
"title": "Arbitrary Code Execution", | ||
"from": ["root@0.0.0", "package-name@1.6.1"], | ||
"upgradePath": [], | ||
"isUpgradable": true, | ||
"isPatchable": false, | ||
"name": "package-name", | ||
"version": "1.6.1" | ||
} | ||
], | ||
"ok": false, | ||
"dependencyCount": 1, | ||
"org": "reachable vulns org", | ||
"policy": "# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.\nversion: v1.14.0\nignore: {}\npatch: {}\n", | ||
"isPrivate": true, | ||
"licensesPolicy": { | ||
"severities": {}, | ||
"orgLicenseRules": {} | ||
}, | ||
"packageManager": "maven", | ||
"ignoreSettings": null, | ||
"summary": "30 vulnerable dependency paths", | ||
"remediation": { | ||
"unresolved": [], | ||
"upgrade": { | ||
"package-name@1.6.1": { | ||
"upgradeTo": "package-name@1.6.3", | ||
"vulns": ["SNYK-JAVA-PACAKGE-12345"], | ||
"isTransitive": false | ||
} | ||
}, | ||
"patch": {}, | ||
"ignore": {}, | ||
"pin": {} | ||
}, | ||
"filesystemPolicy": false, | ||
"filtered": { | ||
"ignore": [], | ||
"patch": [] | ||
}, | ||
"uniqueCount": 30 | ||
} |