diff --git a/pyproject.toml b/pyproject.toml index 91f3cd7..3ac462d 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.2" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index 3e2a726..0425684 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,2 +1,2 @@ __author__ = 'socket.dev' -__version__ = '2.1.0' +__version__ = '2.1.2' diff --git a/socketsecurity/core/__init__.py b/socketsecurity/core/__init__.py index 86421cd..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,11 +628,14 @@ def create_new_diff( head_full_scan_id = None if head_full_scan_id is None: - tmp_params = params + 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 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 +799,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};"