■ ■ ■ ■ ■ ■
contrib/descriptions/cveproject.py
| skipped 9 lines |
10 | 10 | | Provides vulnerability descriptions using requests to CVEProject |
11 | 11 | | """ |
12 | 12 | | uri_template = 'https://raw.githubusercontent.com/CVEProject/cvelist/master/{}/{}/{}.json' |
| 13 | + | nist_uri_template = 'https://nvd.nist.gov/vuln/detail/{}' |
13 | 14 | | |
14 | 15 | | def __init__(self, session: Session): |
15 | 16 | | self.sess = session |
| skipped 13 lines |
29 | 30 | | cve_json = response.json() |
30 | 31 | | description = cve_json['description']['description_data'][0]['value'] |
31 | 32 | | self.cache[vuln] = description |
32 | | - | return VulnDescription(description, url) |
| 33 | + | return VulnDescription(description, self.nist_uri_template.format(vuln)) |
33 | 34 | | except HTTPError as he: |
34 | 35 | | return VulnDescription('', 'Description fetching error: ' + str(he)) |
35 | 36 | | |
| skipped 2 lines |