You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JFrog XRay JSON parser don't support CVSSv3 and CWE correctly #3597
Bug description
When we import a report with CWE number, there are not read correctly due to a bug in int conversion:
In parser.py:
cwe = vulnerability['component_versions']['more_details']['cves'][0]['cwe'][0].split('-')[1]
# some can be "NVD-CWE-noinfo"
if not type(cwe) is int:
cwe = 0
This can't work. cwe is always a string like "20" when the CWE is CWE-20.
Steps to reproduce
Steps to reproduce the behavior:
Import a JFrog scan with finding with CWE number and/or CVSS v3 string
Search the finding and there is no CWE number associated or CVSS v3 string
Expected behavior
We can see CWE number and CVSS v3 string.
Deployment method
Docker
Environment information
Operating System: Ubuntu 18.04
DefectDojo Version: 1.11.0
Sample scan files (optional)
The existing ones (many_vulns.json) show also the bug
Additional context (optional)
Found when adding unit tests for the parser with checks to the attributes of the Finding
changed the title [-]JFrog XRay JSON don't support CVSSv3 and CWE correctly[/-][+]JFrog XRay JSON parser don't support CVSSv3 and CWE correctly[/+]on Jan 6, 2021
Activity
[-]JFrog XRay JSON don't support CVSSv3 and CWE correctly[/-][+]JFrog XRay JSON parser don't support CVSSv3 and CWE correctly[/+]Fix JFrog Xray JSON parser for CWE and CVSS v3 (#3597 fix) (#3585)
Fix JFrog Xray JSON parser for CWE and CVSS v3 (DefectDojo#3597 fix) (D…