Skip to content

Fix exit code from returning 5 on diff reports with no error alerts a… #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "hatchling.build"

[project]
name = "socketsecurity"
version = "2.1.18"
version = "2.1.19"
requires-python = ">= 3.10"
license = {"file" = "LICENSE"}
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion socketsecurity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__author__ = 'socket.dev'
__version__ = '2.1.18'
__version__ = '2.1.19'
9 changes: 5 additions & 4 deletions socketsecurity/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ def return_exit_code(self, diff_report: Diff) -> int:

if not self.report_pass(diff_report):
return 1

if len(diff_report.new_alerts) > 0:
# 5 means warning alerts but no blocking alerts
return 5

# if there are only warn alerts should be returning 0. This was not intended behavior
# if len(diff_report.new_alerts) > 0:
# # 5 means warning alerts but no blocking alerts
# return 5
return 0

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