From 7af45bc95b5c4fb9d17580ab90f6cfd8382d9dd6 Mon Sep 17 00:00:00 2001 From: Douglas Date: Sun, 24 Aug 2025 17:02:03 -0700 Subject: [PATCH] Fixed an issue where when there were new alerts the CLI wasn't correctly failing (#114) --- pyproject.toml | 2 +- socketsecurity/__init__.py | 2 +- socketsecurity/core/messages.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1783718..7598d6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" [project] name = "socketsecurity" -version = "2.2.4" +version = "2.2.5" requires-python = ">= 3.10" license = {"file" = "LICENSE"} dependencies = [ diff --git a/socketsecurity/__init__.py b/socketsecurity/__init__.py index c70ff49..7c2fa0f 100644 --- a/socketsecurity/__init__.py +++ b/socketsecurity/__init__.py @@ -1,2 +1,2 @@ __author__ = 'socket.dev' -__version__ = '2.2.4' +__version__ = '2.2.5' diff --git a/socketsecurity/core/messages.py b/socketsecurity/core/messages.py index 42a4fd1..f062114 100644 --- a/socketsecurity/core/messages.py +++ b/socketsecurity/core/messages.py @@ -283,7 +283,7 @@ def create_security_comment_sarif(diff) -> dict: @staticmethod def create_security_comment_json(diff: Diff) -> dict: scan_failed = False - if len(diff.new_alerts) == 0: + if len(diff.new_alerts) > 0: for alert in diff.new_alerts: alert: Issue if alert.error: