Skip to content

Commit 1717d0a

Browse files
authored
Fix exit code from returning 5 on diff reports with no error alerts and only warn (#99)
1 parent d96a409 commit 1717d0a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66

77
[project]
88
name = "socketsecurity"
9-
version = "2.1.18"
9+
version = "2.1.19"
1010
requires-python = ">= 3.10"
1111
license = {"file" = "LICENSE"}
1212
dependencies = [

socketsecurity/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
__author__ = 'socket.dev'
2-
__version__ = '2.1.18'
2+
__version__ = '2.1.19'

socketsecurity/output.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@ def return_exit_code(self, diff_report: Diff) -> int:
5252

5353
if not self.report_pass(diff_report):
5454
return 1
55-
56-
if len(diff_report.new_alerts) > 0:
57-
# 5 means warning alerts but no blocking alerts
58-
return 5
55+
56+
# if there are only warn alerts should be returning 0. This was not intended behavior
57+
# if len(diff_report.new_alerts) > 0:
58+
# # 5 means warning alerts but no blocking alerts
59+
# return 5
5960
return 0
6061

6162
def output_console_comments(self, diff_report: Diff, sbom_file_name: Optional[str] = None) -> None:

0 commit comments

Comments
 (0)