Skip to content

Add test coverage for _validate_notification_target#1691

Open
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#1691
Open

Add test coverage for _validate_notification_target#1691
tmdeveloper007 wants to merge 1 commit into
utksh1:mainfrom
tmdeveloper007:#1691

Conversation

@tmdeveloper007

Copy link
Copy Markdown
Contributor

Problem

_validate_notification_target in backend/secuscan/routes.py handles webhook URL validation, SSRF protection, and email format validation. No direct unit tests exist.

Fix

  1. Extract the function into backend/secuscan/routes_email_validation.py.
  2. Add 19 unit tests covering valid/invalid webhook URLs, SSRF protection, email format, and empty/whitespace inputs.
  3. Update routes.py to re-export from the new module.

Acceptance Criteria

  • backend/secuscan/routes_email_validation.py created with extracted logic.
  • testing/backend/unit/test_routes_email_validation.py with 19 tests passing locally.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant