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.

ci: document reviewed PDF staging path boundaries (#8199)

LearningCircuit5c4e03f4750e
diff --git a/src/local_deep_research/research_library/services/pdf_storage_manager.py b/src/local_deep_research/research_library/services/pdf_storage_manager.py
index 230fc1cdae..1ba9aa2d28 100644
--- a/src/local_deep_research/research_library/services/pdf_storage_manager.py
+++ b/src/local_deep_research/research_library/services/pdf_storage_manager.py
@@ -423,10 +423,12 @@ class PDFStorageManager:
"research_library.pdf_storage_mode": self.storage_mode
},
)
+ # nosemgrep: semgrep.rules.path-traversal-risk, reason: validate_safe_path constrains the destination and the generated staging basename stays in its directory; replace does not follow a destination leaf link
staged_path.replace(validated_path)
finally:
# After a successful move there is nothing left to remove.
try:
+ # nosemgrep: semgrep.rules.path-traversal-risk, reason: cleanup unlinks only this write's generated staging basename beside the validated destination
staged_path.unlink(missing_ok=True)
except OSError as exc:
logger.warning(