Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test(security): add ntfys:// scheme test coverage and update docs (#3757)

LearningCircuit8e00e49836a4
diff --git a/SECURITY.md b/SECURITY.md
index b52fb84dc9..c48e02f3f3 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -124,7 +124,7 @@ LDR_NOTIFICATIONS_ALLOW_OUTBOUND=true
By setting this, the operator acknowledges the residual risk above. To minimise it:
-- **Prefer plugin schemes over raw `http(s)://`.** Apprise plugin schemes (`discord://`, `slack://`, `ntfy://`, `gotify://`, `telegram://`, `mattermost://`, `rocketchat://`, `teams://`, `matrix://`, `mailto://`, etc.) hardcode their endpoints internally and have no user-controllable hostname — no SSRF surface. Use them whenever the target service supports them.
+- **Prefer plugin schemes over raw `http(s)://`.** Apprise plugin schemes (`discord://`, `slack://`, `ntfy://`, `ntfys://`, `gotify://`, `telegram://`, `mattermost://`, `rocketchat://`, `teams://`, `matrix://`, `mailto://`, etc.) hardcode their endpoints internally and have no user-controllable hostname — no SSRF surface. Use them whenever the target service supports them.
- **Restrict egress** if private-network exposure is a concern: deploy LDR behind an egress-restricted network so that even a successful rebinding cannot reach internal services.
The same DNS-rebinding caveat applies to `safe_requests` / `ssrf_validator.validate_url`, used for general HTTP fetches (RAG sources, web scraping). Egress restriction is the primary defense for that path as well.
diff --git a/src/local_deep_research/security/notification_validator.py b/src/local_deep_research/security/notification_validator.py
index d5f26211bd..b6d9bdf615 100644
--- a/src/local_deep_research/security/notification_validator.py
+++ b/src/local_deep_research/security/notification_validator.py
@@ -106,7 +106,7 @@ class NotificationURLValidator:
# risk-acceptance. See SECURITY.md "Notification Webhook
# SSRF" for details.
# Operators wanting to avoid the window entirely should
- # prefer plugin schemes (discord://, slack://, ntfy://,
+ # prefer plugin schemes (discord://, slack://, ntfy://, ntfys://,
# gotify://, telegram://, mattermost://, etc.) that hardcode
# their endpoints instead of raw http(s):// webhooks.
#
diff --git a/tests/security/test_notification_validator.py b/tests/security/test_notification_validator.py
index 42350ee916..2033054661 100644
--- a/tests/security/test_notification_validator.py
+++ b/tests/security/test_notification_validator.py
@@ -239,6 +239,14 @@ class TestValidateServiceUrl:
assert is_valid is True
assert error is None
+ def test_ntfys_scheme_valid(self):
+ """Should accept ntfys:// URLs (HTTPS variant of ntfy)."""
+ is_valid, error = NotificationURLValidator.validate_service_url(
+ "ntfys://topic"
+ )
+ assert is_valid is True
+ assert error is None
+
def test_http_localhost_blocked(self):
"""Should block http://localhost by default."""
is_valid, error = NotificationURLValidator.validate_service_url(
@@ -418,6 +426,7 @@ class TestClassConstants:
assert "slack" in allowed
assert "telegram" in allowed
assert "mailto" in allowed
+ assert "ntfys" in allowed
def test_private_ip_ranges_exist(self):
"""PRIVATE_IP_RANGES should contain RFC1918 and other private ranges."""
diff --git a/tests/web/services/test_notification_coverage.py b/tests/web/services/test_notification_coverage.py
index 84de6c1c72..66a59f2fa5 100644
--- a/tests/web/services/test_notification_coverage.py
+++ b/tests/web/services/test_notification_coverage.py
@@ -123,6 +123,7 @@ class TestNotificationURLValidator:
"gotify://gotify.example.com/token",
"pushover://user_key/token",
"ntfy://ntfy.sh/topic",
+ "ntfys://ntfy.sh/topic",
"json://hooks.example.com/endpoint",
"xml://hooks.example.com/endpoint",
"form://hooks.example.com/endpoint",