~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
docs(egress): add runtime backstop + MCP audit net to the enforcement map (#4543)
LearningCircuit6d5518d64261
diff --git a/src/local_deep_research/security/egress/README.md b/src/local_deep_research/security/egress/README.mdindex a95ef25bbb..bf95b7e4bb 100644--- a/src/local_deep_research/security/egress/README.md+++ b/src/local_deep_research/security/egress/README.md@@ -268,6 +268,8 @@ Each cell is the decision produced by the real `evaluate_*` logic / PEP for that| **adaptive just matches the primary engine** | `_resolve_adaptive_scope`: private primary → PRIVATE_ONLY, public primary → PUBLIC_ONLY, unknown → BOTH. A registered local retriever primary also resolves PRIVATE_ONLY. Uses the engine's **static class flags** (`is_public`/`is_local` on the Python class), not the network location of the engine's server — so a locally-hosted SearXNG (class `is_public=True`) resolves to PUBLIC_ONLY. Resolved once at run start; the stored `EgressContext` carries the concrete scope, not ADAPTIVE. || **A private RAG collection as ADAPTIVE primary pulls the whole run local** | `_resolve_collection_is_public` defaults private → `_engine_bucket` returns local → adaptive resolves PRIVATE_ONLY → forces local LLM + embeddings. Mark the collection `is_public` to opt into cloud inference. || **Cloud-metadata is never reachable, under any scope** | `evaluate_url` runs `is_ip_blocked(..., allow_private_ips=True)` before scope logic; `_classify_host` applies the same metadata block on BOTH the literal-IP and DNS-resolved paths; NAT64-wrapped metadata is reclassified PUBLIC. |+| **An engine self-checks scope at run time, even off the factory path** | `BaseSearchEngine._verify_egress_scope()` runs at the top of `run()` (and inside `CollectionSearchEngine.search()` / `LibraryRAGSearchEngine.search()`, which bypass `run()`), re-evaluating `evaluate_engine` against the engine's stored snapshot and **raising `PolicyDeniedError`** on a mismatch. Memoized per snapshot identity + (scope, primary) values so the hot path pays the evaluation once. A defense-in-depth backstop behind the factory PEP for engines built by direct instantiation; it cannot deny anything the factory would have allowed. |+| **Direct MCP searches still arm the socket-level net** | `mcp/server.py::_egress_audit_net()` builds the run's `EgressContext` from the request snapshot and arms the PEP-578 audit hook around `engine.run()`, so a direct MCP search (which never goes through `AdvancedSearchSystem`) still gets the raw-socket backstop under PRIVATE_ONLY/STRICT. Fails open to a no-op when the policy is unevaluable — the factory PEP remains primary. |### Advisory candidate pre-filter