From 46cc6da406442e6b769f0286c358ced03725333f Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 21 May 2025 21:57:58 +0200 Subject: [PATCH 1/2] Log scanning of ecosystems This is helpful to see the scan progress, especially in large projects with lots of files, and also relevant for being able to effectively use the `--excluded-ecosystems` parameter. --- socketsecurity/core/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index 178650e..0d6245f 100644 --- a/socketsecurity/core/__init__.py +++ b/socketsecurity/core/__init__.py @@ -186,6 +186,7 @@ def find_files(self, path: str) -> List[str]: for ecosystem in patterns: if ecosystem in self.config.excluded_ecosystems: continue + log.info(f'Scanning ecosystem: {ecosystem}') ecosystem_patterns = patterns[ecosystem] for file_name in ecosystem_patterns: original_pattern = ecosystem_patterns[file_name]["pattern"] From 4b378e659ba3fa992f0412cc8bc66ef34edc23a9 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Wed, 21 May 2025 21:57:21 +0200 Subject: [PATCH 2/2] Add more info-level logs This helps tracking progress in CI --- socketsecurity/core/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index 0d6245f..a048ab0 100644 --- a/socketsecurity/core/__init__.py +++ b/socketsecurity/core/__init__.py @@ -209,7 +209,7 @@ def find_files(self, path: str) -> List[str]: glob_end = time.time() log.debug(f"Globbing took {glob_end - glob_start:.4f} seconds") - log.debug(f"Total files found: {len(files)}") + log.info(f"Total files found: {len(files)}") return sorted(files) def get_supported_patterns(self) -> Dict: @@ -323,7 +323,7 @@ def create_full_scan(self, files: List[str], params: FullScanParams, has_head_sc Returns: FullScan object with scan results """ - log.debug("Creating new full scan") + log.info("Creating new full scan") create_full_start = time.time() res = self.sdk.fullscans.post(files, params, use_types=True)