Added back in transitive logic and fixed format of integration messages #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixed multiple issues with Socket Basics formatters and notifiers:
Tier 1 Reachability Sorting: Socket Tier 1 results were displaying in incorrect order - packages and findings needed to be sorted by severity (Critical → High → Medium → Low) and reachability sections needed proper prioritization (Reachable → Unknown → Error → Unreachable)
Full Scan URL Links Missing: Notifiers were not displaying "View Full Socket Scan" links at the bottom of notifications, even when the Socket API successfully returned the scan URL
Slack Invalid Blocks Error: Slack notifier was receiving
invalid_blockserrors due to content being appended to blocks instead of being added as separate structured blocksIncorrect notifications.yaml Path: All formatters were looking for
notifications.yamlin the wrong location (socket_basics/core/notifications.yamlinstead ofsocket_basics/notifications.yaml)Root Cause
Sorting Logic: Socket Tier 1 formatters were using ascending sort (
sort(key=lambda x: x[0])) which correctly puts critical (0) before high (1), but the reachability sections were being iterated in the wrong order (Reachable → Unreachable → Unknown instead of the proper priority order). Additionally, the 'error' reachability type was missing from the grouping structure.URL Link Logic: The notifiers were conditionally creating a new dict only when
full_scan_urlexisted, causing inconsistent behavior. The notification manager was also potentially overwriting the URL if it existed in app_config but not properly preserving it when already present in the facts dict.Slack Block Structure: The Slack notifier was appending the full scan URL directly to the content string within a single block, which could exceed Slack's 3000 character limit and cause validation errors. Additionally, there was no content length truncation.
Path Resolution: Formatters were using
Path(__file__).parent.parent.parentwhich resolved tosocket_basics/core/instead of going up one more level tosocket_basics/.Fix
Socket Tier 1 Sorting & Grouping:
purl_groupsdefaultdict to include all four reachability types:{'reachable': [], 'unknown': [], 'error': [], 'unreachable': []}slack.py,ms_teams.py,github_pr.py,jira.pyFull Scan URL Links:
full_scan_urlexistsif 'full_scan_html_url' not in facts:before attempting to set it from app_config, preserving the URL if already present in the results dictSlack Block Validation:
sectionblock instead of appending to contentnotifications.yaml Path:
Path(__file__).parent.parent.parent.parent / 'notifications.yaml'to correctly resolve tosocket_basics/notifications.yamlopengrep/,trufflehog/,socket_tier1/(slack, ms_teams, github_pr, jira, ms_sentinel, sumologic)Public Changelog