Skip to content

feat(python-cli-parity): complete per-run notification acceptance - #1839

Open
John-David Dalton (jdalton) wants to merge 1 commit into
jdalton/surf-2239-create-jira-tasks-from-scanfrom
jdalton/surf-2225-scan-notification-acceptance
Open

John-David Dalton (jdalton) wants to merge 1 commit into
jdalton/surf-2239-create-jira-tasks-from-scanfrom
jdalton/surf-2225-scan-notification-acceptance

Conversation

@jdalton

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

Copy link
Copy Markdown
Contributor

The Socket Python CLI can send scan-level findings to Slack and Jira for teams that want CI results routed into their existing work channels and tracking tools. These per-run messages complement managed organization notifications, which follow alert lifecycle events.

This PR sends Slack webhooks, Slack bot channels, and Jira tasks independently so a failure in one provider does not prevent delivery to the others. It documents how the per-run report flow differs from managed integrations and where both can report the same default-branch finding.

Configure notifications in trusted CI jobs:

  • Slack webhooks: set SOCKET_SLACK_CONFIG_JSON with a webhook URL; optionally set SOCKET_SLACK_LEVELS to block,warn (the default).
  • Slack bot: set SOCKET_SLACK_BOT_TOKEN and include bot_configs with channel IDs in SOCKET_SLACK_CONFIG_JSON.
  • Jira: set SOCKET_JIRA_ENABLED=true and provide SOCKET_JIRA_CONFIG_JSON with the HTTPS Jira URL, account email, API token, and project key.

Jira creates one Task for a report with findings and updates it on reruns for the same repository, branch, pull request, and commit. Managed notification settings remain in Socket organization integrations.

@cursor

cursor Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are limited to notification dispatch ordering/isolation and documentation; scan policy outcomes stay unchanged when delivery fails.

Overview
Per-run Slack and Jira notifications are now treated as three independent providers in dispatchScanNotifications: Jira, Slack incoming webhooks (isSlackWebhookConfigured), and Slack bot posts (gated on SOCKET_SLACK_BOT_TOKEN). A failure in one channel no longer blocks the others, including when webhook and Jira reject while the bot path still runs.

Docs in report.md state that scan create and diff report flows can use the same Slack/Jira env configuration (examples use socket scan create --report instead of socket ci). A new section contrasts managed organization alert lifecycle notifications with per-run CI summaries, notes overlap on default-branch scans, and points credential configuration at trusted CI secrets vs Socket org integrations.

A Vitest case in dispatch.test.mts locks in that the same NotificationReport (including diff scans with reachability findings) is delivered to all enabled providers despite errors from Jira and the webhook.

Reviewed by Cursor Bugbot for commit 0ecfde1. Configure here.

@jdalton John-David Dalton (jdalton) changed the title jdalton/surf 2225 scan notification acceptance feat(python-cli-parity): complete per-run notification acceptance Dec 4, 2026
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2225-scan-notification-acceptance branch 2 times, most recently from 0ecfde1 to cd5a112 Compare December 4, 2026 06:16
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2225-scan-notification-acceptance branch from cd5a112 to 4fbdf68 Compare December 4, 2026 14:38
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2225-scan-notification-acceptance branch from 4fbdf68 to 515bb03 Compare December 4, 2026 17:42
@jdalton
John-David Dalton (jdalton) force-pushed the jdalton/surf-2225-scan-notification-acceptance branch from 515bb03 to 544243a Compare December 4, 2026 17:47

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