File tree 5 files changed +7
-6
lines changed
5 files changed +7
-6
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ def import_vulnerabilities():
40
40
cve_id = advisory .get ('cve' )
41
41
vuln_id = advisory ['id' ]
42
42
vuln_version_ranges = advisory ['specs' ]
43
+ affected_versions = set ()
43
44
for vuln_version_range in vuln_version_ranges :
44
45
version_range = RangeSpecifier (vuln_version_range )
45
46
affected_versions = set ()
Original file line number Diff line number Diff line change @@ -76,14 +76,14 @@ def list_sources(self):
76
76
def import_data (self , names , cutoff_date ):
77
77
importers = []
78
78
unknown_importers = set ()
79
-
79
+
80
80
# make sure all arguments are valid before running any importers
81
81
for name in names :
82
82
try :
83
83
importers .append (Importer .objects .get (name = name ))
84
84
except Importer .DoesNotExist :
85
85
unknown_importers .add (name )
86
-
86
+
87
87
if unknown_importers :
88
88
unknown_importers = ', ' .join (unknown_importers )
89
89
raise CommandError (f'Unknown data sources: { unknown_importers } ' )
Original file line number Diff line number Diff line change @@ -138,10 +138,10 @@ class Importer(models.Model):
138
138
name = models .CharField (max_length = 100 , unique = True , help_text = 'Name of the importer' )
139
139
license = models .CharField (max_length = 100 , blank = True , help_text = 'License of the vulnerability data' )
140
140
last_run = models .DateTimeField (null = True , help_text = 'UTC Timestamp of the last run' )
141
-
141
+
142
142
data_source = models .CharField (
143
143
max_length = 100 ,
144
- help_text = 'Class name of the data source implementation importable from vulnerabilities.importers' ,
144
+ help_text = 'Class name of the data source implementation importable from vulnerabilities.importers' ,
145
145
)
146
146
data_source_cfg = pgfields .JSONField (
147
147
null = False ,
Original file line number Diff line number Diff line change 21
21
# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
22
22
# Visit https://github.com/nexB/vulnerablecode/ for support and download.
23
23
24
- from vulnerabilities .scraper .rust import rust_crate_advisories
25
- from vulnerabilities .scraper .rust import load_advisory
24
+ from vulnerabilities .importers .rust import rust_crate_advisories
25
+ from vulnerabilities .importers .rust import load_advisory
26
26
27
27
RUSTSEC_DB_URL = 'https://github.com/RustSec/advisory-db/archive/master.zip'
28
28
You can’t perform that action at this time.
0 commit comments