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.

fix(security): suppress false-positive scanner alerts (#7684-#7695) (#3590)

LearningCircuitd61f2a72c51d
diff --git a/.grype.yaml b/.grype.yaml
index b1a7481f58..e55c1a5ce3 100644
--- a/.grype.yaml
+++ b/.grype.yaml
@@ -349,3 +349,7 @@ ignore:
# --- dpkg ---
- vulnerability: CVE-2026-2219
reason: "High vuln in dpkg 1.22.22. No fix in Trixie yet. Base image python:3.14-slim ships this version."
+
+ # --- sed (GNU sed from Debian base image python:3.14.4-slim) ---
+ - vulnerability: CVE-2026-5958
+ reason: "Low CVE in GNU sed from base image. No public info — may be very new, disputed, or not yet indexed. sed not explicitly installed in Dockerfile; comes from python:3.14.4-slim. Container does not process untrusted input with sed. No fix in Trixie."
diff --git a/bearer.yml b/bearer.yml
index d13193e967..192b850038 100644
--- a/bearer.yml
+++ b/bearer.yml
@@ -113,3 +113,14 @@ rule:
# validated by PathValidator. Pattern enforced by existing security tests.
# Affected: utils/__init__.py:89,97
- python_lang_os_command_injection
+
+ # Permissive file permission alerts (python_lang_file_permissions)
+ # ---------------------------------------------------------------
+ # SAFE TO SKIP: All os.chmod() calls in journal_quality/ follow a
+ # deliberate layered write-protection pattern:
+ # 1. 0o644 transient — relax read-only perms before unlink/atomic os.replace
+ # 2. 0o444 final — read-only permission on the built DB
+ # 3. Pre-commit hook (check-journal-quality-readonly.py) is primary defense
+ #
+ # Affected: db.py:292,1143,1159,1172 downloader.py:510,531
+ - python_lang_file_permissions
diff --git a/src/local_deep_research/journal_quality/downloader.py b/src/local_deep_research/journal_quality/downloader.py
index 2e21389e7f..e34337a1e4 100644
--- a/src/local_deep_research/journal_quality/downloader.py
+++ b/src/local_deep_research/journal_quality/downloader.py
@@ -453,6 +453,10 @@ def download_journal_data(force: bool = False) -> tuple[bool, str]:
try:
shim_name = _FETCH_SHIM_NAMES.get(src.key)
if shim_name:
+ # bearer:disable python_lang_code_injection
+ # _FETCH_SHIM_NAMES is a hardcoded dict (line 188); the
+ # late-bound globals() lookup is needed for mock.patch
+ # compatibility in tests. No user input reaches the key.
n = globals()[shim_name](data_dir, progress_cb=_on_progress)
else:
n = src.fetch(data_dir, progress_cb=_on_progress)