From f1eba969feb20b95d8a552663ec39658ed06be8f Mon Sep 17 00:00:00 2001 From: Douglas Coburn Date: Wed, 11 Jun 2025 06:01:37 -0700 Subject: [PATCH 1/2] Version bump --- pyproject.toml | 2 +- socketsecurity/__init__.py | 2 +- socketsecurity/core/__init__.py | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 91f3cd7..8e28fa0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.1.0" +version = "2.1.1" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index 3e2a726..ea04b49 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,2 +1,2 @@ __author__ = 'socket.dev' -__version__ = '2.1.0' +__version__ = '2.1.1' diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index 86421cd..b20cf7f 100644 --- a/socketsecurity/core/__init__.py +++ b/socketsecurity/core/__init__.py @@ -628,11 +628,16 @@ def create_new_diff( head_full_scan_id = None if head_full_scan_id is None: - tmp_params = params + new_params = {} + for key, value in params.__dict__.items(): + if key != 'include_license_details': + new_params[key] = value + tmp_params = FullScanParams(**new_params) + tmp_params.include_license_details = params.include_license_details tmp_params.tmp = True tmp_params.set_as_pending_head = False tmp_params.make_default_branch = False - head_full_scan = self.create_full_scan(Core.empty_head_scan_file(), params) + head_full_scan = self.create_full_scan(Core.empty_head_scan_file(), tmp_params) head_full_scan_id = head_full_scan.id # Create new scan @@ -796,6 +801,8 @@ def get_source_data(package: Package, packages: dict) -> list: introduced_by = [] if package.direct: manifests = "" + if not hasattr(package, "manifestFiles"): + return introduced_by for manifest_data in package.manifestFiles: manifest_file = manifest_data.get("file") manifests += f"{manifest_file};" From 9ba0fca16dc02ac044f60923e6d32aeace6da7cd Mon Sep 17 00:00:00 2001 From: Douglas Coburn Date: Wed, 11 Jun 2025 06:05:02 -0700 Subject: [PATCH 2/2] Version bump --- pyproject.toml | 2 +- socketsecurity/__init__.py | 2 +- socketsecurity/core/__init__.py | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e28fa0..3ac462d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.1.1" +version = "2.1.2" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index ea04b49..0425684 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,2 +1,2 @@ __author__ = 'socket.dev' -__version__ = '2.1.1' +__version__ = '2.1.2' diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index b20cf7f..658c94c 100644 --- a/socketsecurity/core/__init__.py +++ b/socketsecurity/core/__init__.py @@ -15,7 +15,7 @@ from socketdev.org import Organization from socketdev.repos import RepositoryInfo from socketdev.settings import SecurityPolicyRule - +import copy from socketsecurity import __version__ from socketsecurity.core.classes import ( Alert, @@ -628,10 +628,8 @@ def create_new_diff( head_full_scan_id = None if head_full_scan_id is None: - new_params = {} - for key, value in params.__dict__.items(): - if key != 'include_license_details': - new_params[key] = value + new_params = copy.deepcopy(params.__dict__) + new_params.pop('include_license_details') tmp_params = FullScanParams(**new_params) tmp_params.include_license_details = params.include_license_details tmp_params.tmp = True