python-scf
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: python-scf | ||
| Version: 0.2.0 | ||
| Version: 0.2.1 | ||
| Summary: A small tool to fetch informations about CVE from suse.com. | ||
@@ -5,0 +5,0 @@ Author: dadav |
| Metadata-Version: 2.1 | ||
| Name: python-scf | ||
| Version: 0.2.0 | ||
| Version: 0.2.1 | ||
| Summary: A small tool to fetch informations about CVE from suse.com. | ||
@@ -5,0 +5,0 @@ Author: dadav |
+1
-1
@@ -1,1 +0,1 @@ | ||
| __version__ = '0.2.0' | ||
| __version__ = '0.2.1' |
+5
-2
| import os | ||
| import json | ||
| import re | ||
| from random import random | ||
| from time import sleep | ||
@@ -133,3 +134,4 @@ from multiprocessing import Pool | ||
| cve_filter: str = typer.Option(f'CVE-{datetime.now().year}-.*', | ||
| '--filter', help="Regex to apply on the CVEs to fetch."),) -> None: | ||
| '--filter', help="Regex to apply on the CVEs to fetch."), | ||
| workers: int = typer.Option(os.cpu_count(), '-w', '--workers', help='The number of workers that should be started'),) -> None: | ||
| """ | ||
@@ -145,6 +147,7 @@ Prefetch all the cve data | ||
| with Pool(processes=os.cpu_count()) as pool: | ||
| with Pool(processes=workers) as pool: | ||
| for cve in pool.imap_unordered(prefetch_cve, cve_list): | ||
| progress.update(task, description=f'Populating cache...{cve}') | ||
| progress.advance(task) | ||
| sleep(random()) | ||
@@ -151,0 +154,0 @@ |
+6
-1
@@ -48,4 +48,9 @@ """ | ||
| res = cache.get(url, timeout=timeout, verify=settings.connection.ssl_verify) | ||
| user_agent = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0'} | ||
| res = cache.get(url, | ||
| headers=user_agent, | ||
| timeout=timeout, | ||
| verify=settings.connection.ssl_verify) | ||
| res.raise_for_status() | ||
@@ -52,0 +57,0 @@ |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
69409
0.53%700
1.01%