|
1 | 1 | # |
2 | | -# Copyright (c) 2017 nexB Inc. and others. All rights reserved. |
| 2 | +# Copyright (c) nexB Inc. and others. All rights reserved. |
3 | 3 | # http://nexb.com and https://github.com/nexB/vulnerablecode/ |
4 | 4 | # The VulnerableCode software is licensed under the Apache License version 2.0. |
5 | 5 | # Data generated with VulnerableCode require an acknowledgment. |
|
18 | 18 | # OR CONDITIONS OF ANY KIND, either express or implied. No content created from |
19 | 19 | # VulnerableCode should be considered or used as legal advice. Consult an Attorney |
20 | 20 | # for any legal advice. |
21 | | -# VulnerableCode is a free software code scanning tool from nexB Inc. and others. |
| 21 | +# VulnerableCode is a free software tool from nexB Inc. and others. |
22 | 22 | # Visit https://github.com/nexB/vulnerablecode/ for support and download. |
23 | 23 | import dataclasses |
24 | 24 | import json |
|
31 | 31 | from packageurl import PackageURL |
32 | 32 | from schema import Regex, Schema, Or |
33 | 33 |
|
34 | | -from vulnerabilities.data_source import ( |
35 | | - DataSource, |
36 | | - DataSourceConfiguration, |
37 | | - Advisory, |
38 | | - VulnerabilityReferenceUnit, |
39 | | -) |
| 34 | +from vulnerabilities.data_source import Advisory |
| 35 | +from vulnerabilities.data_source import DataSource |
| 36 | +from vulnerabilities.data_source import DataSourceConfiguration |
| 37 | +from vulnerabilities.data_source import VulnerabilityReferenceUnit |
40 | 38 |
|
41 | 39 |
|
42 | 40 | def validate_schema(advisory_dict): |
@@ -117,10 +115,9 @@ def _parse(self, record) -> List[Advisory]: |
117 | 115 | vuln_references.append( |
118 | 116 | VulnerabilityReferenceUnit( |
119 | 117 | reference_id=ref, |
120 | | - url="https://security.archlinux.org/{}".format(record["name"]), |
| 118 | + url="https://security.archlinux.org/{}".format(ref), |
121 | 119 | ) |
122 | 120 | ) |
123 | | - print(vuln_references) |
124 | 121 |
|
125 | 122 | advisories.append( |
126 | 123 | Advisory( |
|
0 commit comments