~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
Merge origin/dev into feature/pdf-upload-improvements
LearningCircuitf2d80a6ef543
diff --cc .gitleaks.tomlindex d17b3d5c4a,53027fb9d3..9d6fe6d161--- a/.gitleaks.toml+++ b/.gitleaks.toml@@@ -82,9 -82,12 +82,15 @@@ paths ='''.*example.*\.py$''','''mock.*\.py$''','''fixture.*\.py$''',+ '''\.github/workflows/.*\.yml$''',+ '''\.github/workflows/.*\.yaml$''',- '''\.gitleaks\.toml$'''++ '''\.gitleaks\.toml$''',+ '''src/local_deep_research/security/file_integrity/.*\.py$''',+ '''src/local_deep_research/library/download_management/.*\.py$''',+ '''src/local_deep_research/research_library/services/download_service\.py$''',+ '''src/local_deep_research/research_library/routes/library_routes\.py$''',+ '''src/local_deep_research/news/subscription_manager/scheduler\.py$''',+ '''pdm\.lock$''' # Contains SHA256 package hashes (not secrets)]files = ["\\.env\\.example$",@@@ -95,15 -98,53 +101,57 @@@commits = [# AI reviewer documentation commit with API key explanation"b31ff6fec15c9fe6f523d1f93f23e321b8803799",+ # PDF upload feature with CSRF token DOM reading- "e0660dd0da5efed3ddbfcf5cfa1985b39f33df16"++ "e0660dd0da5efed3ddbfcf5cfa1985b39f33df16",+ # Download system integration with encrypted database - legitimate password parameters+ "65ebe6bd522152ebb00a1fce38b8f6acb8fdcc7d",+ # OpenRouter documentation commits with placeholder API keys (fixed in later commits)+ "1395290fa5e8a955d5e01ed056e3ee7bad1b888c",+ "00f48008cfedcc01adedc2b3f84246e0e3d883ef",+ "17e4404af5b891b78e7eda99c196f03710e7107b",+ # Notification system commit with user_password parameter names (false positives)+ "17762f9e1b48db91092a867195aca81cfce6ab9c",+ # PDM lock file update with SHA256 content hashes (false positives)+ "3dd78e593550623af172c4d9f857197fdb1dfc99"]regexes = [# Allow comments that explain API key usage but don't contain actual keys'''# API_KEY: OpenRouter API key''','''OPENROUTER_API_KEY''',+ # Allow CSRF token reading from DOM (not a secret exposure)- '''const csrfToken = document\.querySelector'''++ '''const csrfToken = document\.querySelector''',+ # Password parameters and variable assignments (not actual secrets)+ '''self\.password = password''',+ '''self\.username = username''',+ '''password: Optional\[str\]''',+ '''username: str, password: Optional''',+ # Database session context - parameter passing+ '''get_user_db_session\(self\.username, self\.password\)''',+ '''get_user_db_session\(username, password\)''',+ '''username=username, password=password''',+ # Session password storage (encrypted in session)+ '''user_password = session_password_store''',+ '''get_session_password''',+ '''user_password = getattr''',+ # Allow variable names containing password/secret (not actual values)+ '''user_password\s*=''',+ '''password\s*:\s*Optional''',+ '''password\s*:\s*str''',+ '''session_password_store''',+ '''password\)\s*:''',+ # Allow parameter names and type hints+ '''\bpassword:\s*Optional\[str\]''',+ '''\bpassword:\s*str\b''',+ # Allow getattr patterns for password retrieval+ '''getattr\(g,\s*["']user_password["']''',+ # Allow user_password parameter names (not actual passwords)+ '''user_password\s*=\s*user_password''',+ '''user_password=user_password''',+ # Allow SHA256 hashes in pdm.lock (package integrity hashes)+ '''hash\s*=\s*"sha256:[a-fA-F0-9]{64}"''',+ '''content_hash\s*=\s*"sha256:[a-fA-F0-9]{64}"''',+ # Allow CSRF token meta tag selectors (JavaScript, not actual secrets)+ '''csrf_token\s*=\s*document\.querySelector''']# Target specific files for scanningdiff --cc src/local_deep_research/security/__init__.pyindex b4be51c3a2,5893ca0396..706b3fdda1--- a/src/local_deep_research/security/__init__.py+++ b/src/local_deep_research/security/__init__.py@@@ -1,12 -1,28 +1,33 @@@"""Security utilities for Local Deep Research."""+ from .data_sanitizer import DataSanitizer, redact_data, sanitize_data+ from .file_integrity import FileIntegrityManager, FAISSIndexVerifier+from .file_upload_validator import FileUploadValidator- from .path_validator import PathValidator+ from .notification_validator import (+ NotificationURLValidator,+ NotificationURLValidationError,+ )+from .rate_limiter import init_rate_limiter, upload_rate_limit+ # PathValidator requires werkzeug (Flask dependency), import conditionally+ try:+ from .path_validator import PathValidator++ _has_path_validator = True+ except ImportError:+ PathValidator = None # type: ignore+ _has_path_validator = False+__all__ = ["PathValidator",+ "DataSanitizer",+ "sanitize_data",+ "redact_data",+ "FileIntegrityManager",+ "FAISSIndexVerifier",+ "FileUploadValidator",+ "NotificationURLValidator",+ "NotificationURLValidationError",+ "init_rate_limiter",+ "upload_rate_limit",]