Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
7 changes: 6 additions & 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.2.40"
version = "2.2.41"
requires-python = ">= 3.10"
license = {"file" = "LICENSE"}
dependencies = [
Expand Down Expand Up @@ -160,3 +160,8 @@ docstring-code-line-length = "dynamic"

[tool.hatch.build.targets.wheel]
include = ["socketsecurity", "LICENSE"]

[dependency-groups]
dev = [
"pre-commit>=4.3.0",
]
2 changes: 1 addition & 1 deletion socketsecurity/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = 'socket.dev'
__version__ = '2.2.40'
__version__ = '2.2.41'
USER_AGENT = f'SocketPythonCLI/{__version__}'
9 changes: 8 additions & 1 deletion socketsecurity/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1317,8 +1317,15 @@ def add_package_alerts_to_collection(self, package: Package, alerts_collection:
url=package.url
)

if alert.type in self.config.security_policy:
# Use action from API if present (label policy, triage, etc.),
# otherwise fall back to security policy
action = None
if 'action' in alert_item and alert_item['action']:
action = alert_item['action']
elif alert.type in self.config.security_policy:
action = self.config.security_policy[alert.type]['action']

if action:
setattr(issue_alert, action, True)

if issue_alert.key not in alerts_collection:
Expand Down
22 changes: 13 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading