Skip to content

feat(python-cli-parity): send scan notifications to Slack webhooks - #1833

Open
John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
parity/2241-notification-foundation
Open

John-David Dalton (jdalton) wants to merge 1 commit into
v1.xfrom
parity/2241-notification-foundation

Conversation

@jdalton

@jdalton John-David Dalton (jdalton) commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

The Socket Python CLI sends scan findings to Slack so teams can see what needs attention. This PR adds incoming webhook delivery to Socket CLI scan reports. Set SOCKET_SLACK_CONFIG_JSON to a JSON object with the webhook URL in url.

@cursor

cursor Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Notifications are opt-in and failure-isolated from scan policy, but misconfigured webhooks could expose finding details to unintended Slack channels.

Overview
Adds an opt-in Slack notification path for the socket scan create --report flow (full-scan report and PR diff), aligned with the Python CLI’s webhook model.

When SOCKET_SLACK_CONFIG_JSON is set, the CLI builds a notification payload from scan or diff findings and POSTs Block Kit–style messages to configured HTTPS incoming webhooks. SOCKET_SLACK_LEVELS defaults to block,warn; per-destination url_configs can filter by repo, alert_types, or severities (alert_types wins over severities). Repository/branch metadata is threaded from scan creation through handlePrDiffScan / handleScanReport into outputDiffScan and outputScanReport. Standalone socket scan report does not send notifications.

Delivery failures and bad config are logged as warnings and do not change exit codes or blocking decisions. Docs under docs/commands/scan/report.md describe setup; unit tests cover filtering, malformed config, redirects, and timeouts.

Reviewed by Cursor Bugbot for commit 66ea735. Configure here.

@jdalton John-David Dalton (jdalton) changed the title parity/2241 notification foundation feat(python-cli-parity): send scan notifications to Slack webhooks Dec 4, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 5 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 66ea735. Configure here.

Comment thread src/commands/scan/output-diff-scan.mts Resolved
@jdalton
John-David Dalton (jdalton) force-pushed the parity/2241-notification-foundation branch 5 times, most recently from 7b3f705 to 7ef07cf Compare December 4, 2026 17:38
@jdalton
John-David Dalton (jdalton) force-pushed the parity/2241-notification-foundation branch from 7ef07cf to a3ea3f7 Compare December 4, 2026 17:46

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant