Skip to content

feat(notifications): Add Slack Webhook Integration for Scan Completion Alerts#1255

Merged
utksh1 merged 2 commits into
utksh1:mainfrom
Rafiaminhaj:feature/slack-notifications
Jun 24, 2026
Merged

feat(notifications): Add Slack Webhook Integration for Scan Completion Alerts#1255
utksh1 merged 2 commits into
utksh1:mainfrom
Rafiaminhaj:feature/slack-notifications

Conversation

@Rafiaminhaj

Copy link
Copy Markdown
Contributor

Description

This PR implements a client-side Slack Webhook integration to post structured block alerts to a configured Slack channel when a security scan completes or fails.

  • Added slack_webhook_url configuration, customizable via SECUSCAN_SLACK_WEBHOOK_URL env variable.
  • Created process_slack_notification handler in notification_service.py to:
    • Extract scan status, target, duration, and findings counts.
    • Construct a clean Slack Block Kit layout detailing severity breakdowns (Critical, High, Medium, Low, Info) or failed error messages.
    • Deliver notifications securely using SSRF/DNS-rebinding protected webhooks.
  • Integrated the handler into the executor pipeline so it fires automatically at the end of task execution.

Related Issues

Closes #1133

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • Added extensive backend unit tests: test_process_slack_notification_success and test_process_slack_notification_failed_task inside test_notification_service.py.
  • Ran the unit test suite locally using pytest:
    venv\Scripts\python -m pytest testing/backend/unit/test_notification_service.py
    # Result: 22 passed successfully!

@utksh1 utksh1 merged commit e376276 into utksh1:main Jun 24, 2026
6 of 9 checks passed
@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Admin validation: approved for GSSoC scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Slack Webhook Integration for Scan Notifications

2 participants