diff --git a/depscan/cli.py b/depscan/cli.py index 551af24d..8072502c 100755 --- a/depscan/cli.py +++ b/depscan/cli.py @@ -536,6 +536,7 @@ def download_rafs_based_image(): nydus_download_command, check=True, stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, ) if os.path.exists(os.path.join(data_dir, "vdb.tar")): rafs_image_downloaded = True diff --git a/depscan/lib/logger.py b/depscan/lib/logger.py index b28badb4..3cad6bdd 100644 --- a/depscan/lib/logger.py +++ b/depscan/lib/logger.py @@ -57,11 +57,16 @@ class CustomHighlighter(RegexHighlighter): ], ) LOG = logging.getLogger(__name__) -for _ in ("httpx", "oras"): - logging.getLogger(_).disabled = True # Set logging level -if os.getenv("SCAN_DEBUG_MODE") == "debug" or os.getenv("AT_DEBUG_MODE") == "debug": +if ( + os.getenv("SCAN_DEBUG_MODE") == "debug" + or os.getenv("AT_DEBUG_MODE") == "debug" +): LOG.setLevel(logging.DEBUG) DEBUG = logging.DEBUG + +for log_name, log_obj in logging.Logger.manager.loggerDict.items(): + if log_name != __name__: + log_obj.disabled = True diff --git a/pyproject.toml b/pyproject.toml index 17db7016..e27cf8a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "owasp-depscan" -version = "5.1.3" +version = "5.1.4" description = "Fully open-source security audit for project dependencies based on known vulnerabilities and advisories." authors = [ {name = "Team AppThreat", email = "cloud@appthreat.com"},