fix: [cve_advanced] Some CVEs are not in CWE format but in NVD-CWE-Other

pull/496/head
Alexandre Dulaunoy 2021-04-08 19:14:13 +02:00
parent 51e6122c67
commit 0752628de5
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class VulnerabilityParser():
)
def __parse_weakness(self, vulnerability_uuid):
cwe_string, cwe_id = self.vulnerability['cwe'].split('-')
cwe_string, cwe_id = self.vulnerability['cwe'].split('-')[:2]
cwes = requests.get(self.api_url.replace('/cve/', '/cwe'))
if cwes.status_code == 200:
for cwe in cwes.json():