feat(notifications): add delivery service with dedupe and redaction (PR 3 of #254)#483
Merged
utksh1 merged 3 commits intoJun 4, 2026
Merged
Conversation
utksh1
approved these changes
Jun 4, 2026
Owner
utksh1
left a comment
There was a problem hiding this comment.
Reviewed the notification delivery service, redaction/dedupe behavior, and unit coverage. The implementation is scoped, has green CI, and is acceptable for merge after updating against current main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part 3 of 5 for #254 — notification delivery service (webhook, dedupe, redaction, history).
Description
This is PR 3 of 5 for #254 (notification channels for high/critical findings).
PR 1 added database schema and models.
PR 2 added API routes for rules and history.
This PR adds the notification delivery service that actually evaluates rules and sends alerts.
What this PR adds:
backend/secuscan/notification_service.py — delivery logic
Severity matching — only notifies when finding severity meets the rule threshold
Dedupe — skips if the same rule already successfully notified the same finding
Redaction — alert payloads redact secrets (tokens, API keys, etc.) before send
Webhook — HTTP POST to configured URLs via httpx
Email — placeholder channel (logs intent, records success; SMTP not implemented yet)
History — writes every attempt to notification_history (success/failed + error)
httpx added to backend/requirements.txt
7 unit tests in testing/backend/unit/test_notification_service.py
Planned execution order:
DB schema + models ✅ merged
API routes ✅ merged
Delivery service ← this PR
Executor hook (trigger after scan)
Settings UI
Hi @utksh1 — continuing the split from #360. Please review when you can.
Type of Change
New feature (non-breaking change which adds functionality)
Checklist
My code follows the code style of this project.
I have performed a self-review of my own code.
My changes generate no new warnings.