New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

python-scf

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

python-scf - pypi Package Compare versions

Comparing version
0.2.0
to
0.2.1
+1
-1
PKG-INFO
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 +0,1 @@

__version__ = '0.2.0'
__version__ = '0.2.1'
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 @@

@@ -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 @@