diff --git a/safety/scan/ecosystems/python/main.py b/safety/scan/ecosystems/python/main.py index b72f840a..06415d3b 100644 --- a/safety/scan/ecosystems/python/main.py +++ b/safety/scan/ecosystems/python/main.py @@ -81,7 +81,8 @@ def ignore_vuln_if_needed( spec_ignored: bool = False - if vuln_id in ignore_vulns.keys() and str(specification.specifier) in ignore_vulns[vuln_id].specifications: + vuln = ignore_vulns.get(vuln_id) + if vuln is not None and vuln.specifications is not None and str(specification.specifier) in vuln.specifications: spec_ignored = True if (not spec_ignored) and \ diff --git a/setup.cfg b/setup.cfg index 9e5347f5..d9c7f156 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,7 @@ classifiers = [options] zip_safe = False include_package_data = True -packages = safety, safety.formatters,safety.formatters.schemas, safety.alerts, safety.auth, safety.scan, safety.scan.finder, safety.scan.ecosystems, safety.scan.ecosystems.python, safety.alerts.templates, safety.templates +packages = safety, safety.formatters,safety.formatters.schemas, safety.alerts, safety.auth, safety.scan, safety.scan.finder, safety.scan.ecosystems, safety.scan.ecosystems.python, safety.alerts.templates, safety.templates, safety.scan.fun_mode python_requires = >=3.7 package_dir = safety = safety