|
14 | 14 | from typing import Dict, List, Tuple, Set |
15 | 15 | from f8a_utils.gh_utils import GithubUtils |
16 | 16 |
|
17 | | -from src.settings import Settings |
| 17 | +from src.settings import AggregatorSettings |
18 | 18 | from src.utils import (select_latest_version, server_create_analysis, |
19 | 19 | persist_data_in_db, post_gremlin, GREMLIN_QUERY_SIZE, |
20 | 20 | format_date) |
@@ -171,8 +171,8 @@ def _has_vulnerability(pkg: PackageDetails) -> bool: |
171 | 171 | # (fixme) link to snyk package should be identified during ingestion. |
172 | 172 | def get_snyk_package_link(ecosystem: str, package: str) -> str: |
173 | 173 | """Prepare snyk package link based on ecosystem and package name.""" |
174 | | - ecosystem = Settings().snyk_ecosystem_map.get(ecosystem, ecosystem) |
175 | | - return Settings().snyk_package_url_format.format(ecosystem=ecosystem, |
| 174 | + ecosystem = AggregatorSettings().snyk_ecosystem_map.get(ecosystem, ecosystem) |
| 175 | + return AggregatorSettings().snyk_package_url_format.format(ecosystem=ecosystem, |
176 | 176 | package=quote(package, safe='')) |
177 | 177 |
|
178 | 178 |
|
@@ -302,11 +302,11 @@ def get_result(self) -> StackAggregatorResult: |
302 | 302 | analyzed_dependencies=package_details, |
303 | 303 | unknown_dependencies=unknown_dependencies, |
304 | 304 | license_analysis=license_analysis, |
305 | | - registration_link=Settings().snyk_signin_url) |
| 305 | + registration_link=AggregatorSettings().snyk_signin_url) |
306 | 306 |
|
307 | 307 | def initiate_unknown_package_ingestion(self): |
308 | 308 | """Ingestion of Unknown dependencies.""" |
309 | | - if Settings().disable_unknown_package_flow: |
| 309 | + if AggregatorSettings().disable_unknown_package_flow: |
310 | 310 | logger.warning('Skipping unknown flow %s', self.get_all_unknown_packages()) |
311 | 311 | return |
312 | 312 |
|
@@ -383,7 +383,7 @@ def __init__(self, request: StackAggregatorRequest = None, |
383 | 383 |
|
384 | 384 | def initiate_unknown_package_ingestion(self): |
385 | 385 | """Ingestion of Unknown dependencies.""" |
386 | | - if Settings().disable_unknown_package_flow: |
| 386 | + if AggregatorSettings().disable_unknown_package_flow: |
387 | 387 | logger.warning('Skipping unknown flow %s', self.get_all_unknown_packages()) |
388 | 388 | return |
389 | 389 | logger.error('Ingestion is Not active for Golang.') |
|
0 commit comments