diff --git a/pyproject.toml b/pyproject.toml index c09b93a..6d9b541 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.1.12" +version = "2.1.14" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index ffbea13..12f3c86 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,2 +1,2 @@ __author__ = 'socket.dev' -__version__ = '2.1.12' +__version__ = '2.1.14' diff --git a/socketsecurity/core/classes.py b/socketsecurity/core/classes.py index 972ec51..e81312c 100644 --- a/socketsecurity/core/classes.py +++ b/socketsecurity/core/classes.py @@ -188,7 +188,7 @@ def from_diff_artifact(cls, data: dict) -> "Package": ValueError: If reference data cannot be found in DiffArtifact """ ref = None - if data["diffType"] in ["added", "updated"] and data.get("head"): + if data["diffType"] in ["added", "updated", "unchanged"] and data.get("head"): ref = data["head"][0] elif data["diffType"] in ["removed", "replaced"] and data.get("base"): ref = data["base"][0] diff --git a/socketsecurity/socketcli.py b/socketsecurity/socketcli.py index a7afd18..c228e4e 100644 --- a/socketsecurity/socketcli.py +++ b/socketsecurity/socketcli.py @@ -260,7 +260,7 @@ def main_code(): output_handler.handle_output(diff) # Handle license generation - if diff is not None and config.generate_license: + if diff is not None and diff.id != "no_diff_id" and config.generate_license: all_packages = {} for purl in diff.packages: package = diff.packages[purl]