diff --git a/vulntotal/datasources/safetydb.py b/vulntotal/datasources/safetydb.py index f37e295b8..9ccad98b3 100644 --- a/vulntotal/datasources/safetydb.py +++ b/vulntotal/datasources/safetydb.py @@ -46,7 +46,7 @@ def fetch_advisory(self): return response.json() def datasource_advisory(self, purl) -> Iterable[VendorData]: - if purl.type != "pypi": + if purl.type not in self.supported_ecosystem(): return [] advisory = self.fetch_advisory() self._raw_dump.append(advisory) diff --git a/vulntotal/tests/test_safetydb.py b/vulntotal/tests/test_safetydb.py index a5e522912..7ae47d724 100644 --- a/vulntotal/tests/test_safetydb.py +++ b/vulntotal/tests/test_safetydb.py @@ -17,7 +17,7 @@ from vulntotal.datasources import safetydb -class TestGithub(testcase.FileBasedTesting): +class TestSafetydb(testcase.FileBasedTesting): test_data_dir = str(Path(__file__).resolve().parent / "test_data" / "safetydb") def test_parse_advisory(self):