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: correct scanner metadata and synchronize release checks (#8143)

LearningCircuitf6eb904ed461
diff --git a/.github/SECURITY_ALERTS.md b/.github/SECURITY_ALERTS.md
index 81a304dc6d..353be6be4e 100644
--- a/.github/SECURITY_ALERTS.md
+++ b/.github/SECURITY_ALERTS.md
@@ -189,6 +189,18 @@ an entry expired. The existing `osv-scanner.toml` `ignoreUntil = 2026-10-31`
is the enforced review date for this advisory: once it expires, a completed
release scan fails if the finding remains.
+CVE-2026-12345 (CPython) is suppressed in `.grype.yaml` only, as a
+scanner-metadata false positive rather than an accepted risk. The issue
+was fixed in CPython 3.14.9, and the
+[CNA record](https://www.cve.org/CVERecord?id=CVE-2026-12345) lists an
+affected 3.14 range that ends before 3.14.9. The production image uses
+3.14.10, which is outside that range. The entry matches only the `python`
+binary package at exact version `3.14.10`, so any other affected build
+still reports. `.trivyignore` has no entry for it.
+`tests/ci/test_reviewed_python_scanner_metadata.py` guards this scope.
+Remove the entry once the scanner database reflects the CNA range or the
+image moves to a different Python build.
+
---
## DS162092 - Hardcoded URLs
@@ -261,7 +273,8 @@ DevSkim identifies long hex strings as possible tokens. The flagged lines
are 40-character Git commit IDs in Gitleaks' `commits` allowlist
(`.gitleaks.toml`, naming historical commits with reviewed false-positive
findings) and public SHA-256 integrity checksums
-(`.github/workflows/ai-code-reviewer.yml`, `scripts/refresh_pip_urllib3.py`).
+(`.github/workflows/ai-code-reviewer.yml`, `scripts/refresh_pip_urllib3.py`,
+`.github/scripts/check_dependency_licenses.py`).
None are credentials. Each affected line carries DevSkim's documented inline
suppression for `DS173237`.
The rule stays enabled across the rest of the repository, and Gitleaks
diff --git a/.github/scripts/check_dependency_licenses.py b/.github/scripts/check_dependency_licenses.py
index 0d5579a814..6333879ad0 100644
--- a/.github/scripts/check_dependency_licenses.py
+++ b/.github/scripts/check_dependency_licenses.py
@@ -188,7 +188,8 @@ REVIEWED_WHEEL_CONTENTS = {
REVIEWED_WHEEL_LICENSE_FILES = {
"spdx-tools": {
"LICENSE": (
- "c5accbbd8546e94c34aed24afe689a617627d18eed5a6c48277e48db57c23851"
+ # Public SHA256 of the reviewed wheel license notice.
+ "c5accbbd8546e94c34aed24afe689a617627d18eed5a6c48277e48db57c23851" # DevSkim: ignore DS173237
),
},
}
diff --git a/.grype.yaml b/.grype.yaml
index 0af3ba475e..f2a36db06a 100644
--- a/.grype.yaml
+++ b/.grype.yaml
@@ -6,6 +6,13 @@
# Last full review: 2026-04-17
ignore:
+ # The CNA's affected 3.14 range ends before 3.14.9. This exact build is
+ # outside it; retain the version constraint while scanner metadata catches up.
+ # https://www.cve.org/CVERecord?id=CVE-2026-12345
+ - vulnerability: CVE-2026-12345
+ package: { name: python, version: 3.14.10, type: binary }
+ reason: "CNA excludes CPython 3.14.9 and newer in this series; this correction applies only to the reviewed 3.14.10 build."
+
# ==========================================================================
# UNFIXABLE VULNERABILITIES — auto-ignored by fix state (no per-CVE entry).
# ==========================================================================
@@ -265,8 +272,9 @@ ignore:
# Fixed in the Python base image, so their entries were removed:
# CVE-2026-4360, CVE-2026-6879, and CVE-2026-15308 (fixed in 3.14.7), and
# CVE-2026-15310, CVE-2026-15806, CVE-2026-17084, and CVE-2026-19672
- # (fixed in 3.14.8). CVE-2026-12345 is fixed in Python 3.14.9 and is
- # also unsuppressed. CVE-2026-87910 remains unsuppressed.
+ # (fixed in 3.14.8). CVE-2026-12345 has only the version-scoped metadata
+ # correction above for the reviewed 3.14.10 build. CVE-2026-87910 remains
+ # unsuppressed.
# ==========================================================================
# NO FIX AVAILABLE IN DEBIAN TRIXIE
diff --git a/.pre-commit-hooks/check-zero-width-unicode.py b/.pre-commit-hooks/check-zero-width-unicode.py
index 1bb324c4f0..cdfa3d158e 100755
--- a/.pre-commit-hooks/check-zero-width-unicode.py
+++ b/.pre-commit-hooks/check-zero-width-unicode.py
@@ -41,12 +41,16 @@ def main() -> int:
for path_arg in sys.argv[1:]:
path = Path(path_arg)
try:
+ # The local repository checker reads caller-selected source files.
+ # bearer:disable python_lang_path_using_user_input
text = path.read_text(encoding="utf-8")
except UnicodeDecodeError:
# Fail closed: undecodable bytes can hide trapdoor codepoints
# (e.g. a valid UTF-8 U+202E next to a stray 0xFF byte), so scan
# the raw bytes for the UTF-8 encodings of every rejected
# codepoint and refuse the file outright instead of skipping it.
+ # Inspect the same caller-selected file when decoding fails.
+ # bearer:disable python_lang_path_using_user_input
raw = path.read_bytes()
for codepoint in all_trapdoor_codepoints():
if chr(codepoint).encode("utf-8") in raw:
diff --git a/src/local_deep_research/journal_quality/data_sources/base.py b/src/local_deep_research/journal_quality/data_sources/base.py
index b3c5a9ceab..70c82a9b2f 100644
--- a/src/local_deep_research/journal_quality/data_sources/base.py
+++ b/src/local_deep_research/journal_quality/data_sources/base.py
@@ -24,7 +24,7 @@ class HostileSnapshotError(RuntimeError):
Raised by a fetcher's accumulation loop once record count crosses
the source's ceiling — a hostile or grossly malformed upstream can
pass every transport check (the manifest self-certifies
- content_length and md5) and otherwise fill the decompressed-char
+ its declared size and checksum) and otherwise fill the decompressed-char
caps with minimal records until the process OOMs. Deliberately a
distinct type so a per-file ``except Exception: continue`` handler
(JabRef) can re-raise it instead of treating a hostile snapshot as
diff --git a/src/local_deep_research/web/auth/session_manager.py b/src/local_deep_research/web/auth/session_manager.py
index bd17c998a0..6213bacaab 100644
--- a/src/local_deep_research/web/auth/session_manager.py
+++ b/src/local_deep_research/web/auth/session_manager.py
@@ -238,6 +238,8 @@ class SessionManager:
current_epoch = read_user_authorization_epoch(username)
except RekeyEpochUnreadableError as error:
# Transient I/O: refuse THIS check, keep the record.
+ # Identity is a separate field; exception text contains only errno.
+ # bearer:disable python_lang_exception
raise SessionValidationUnavailableError(
username, error.errno
) from None
@@ -513,6 +515,8 @@ class SessionManager:
try:
current_epoch = read_user_authorization_epoch(username)
except RekeyEpochUnreadableError as error:
+ # Identity is a separate field; exception text contains only errno.
+ # bearer:disable python_lang_exception
raise SessionValidationUnavailableError(
username, error.errno
) from None
diff --git a/tests/ci/test_reviewed_python_scanner_metadata.py b/tests/ci/test_reviewed_python_scanner_metadata.py
new file mode 100644
index 0000000000..fac70105f5
--- /dev/null
+++ b/tests/ci/test_reviewed_python_scanner_metadata.py
@@ -0,0 +1,31 @@
+"""Keep a reviewed build-specific scanner correction narrowly scoped."""
+
+# allow: no-sut-import — validates the native scanner configuration contract.
+
+from pathlib import Path
+
+import yaml
+
+
+def test_reviewed_python_metadata_correction_keeps_its_exact_build_scope():
+ path = Path(__file__).resolve().parents[2] / ".grype.yaml"
+ policy = yaml.safe_load(path.read_text(encoding="utf-8"))
+ rows = [
+ row
+ for row in policy["ignore"]
+ if row.get("vulnerability") == "CVE-2026-12345"
+ ]
+ assert len(rows) == 1
+ assert rows[0]["package"] == {
+ "name": "python",
+ "version": "3.14.10",
+ "type": "binary",
+ }
+ assert set(rows[0]) == {"vulnerability", "package", "reason"}
+ trivy = path.with_name(".trivyignore").read_text(encoding="utf-8")
+ active_ids = {
+ line.split()[0]
+ for line in trivy.splitlines()
+ if line.strip() and not line.lstrip().startswith("#")
+ }
+ assert "CVE-2026-12345" not in active_ids
diff --git a/tests/deployment/test_deployment_surface_contracts.py b/tests/deployment/test_deployment_surface_contracts.py
index d5af79fc0e..2132eb2d07 100644
--- a/tests/deployment/test_deployment_surface_contracts.py
+++ b/tests/deployment/test_deployment_surface_contracts.py
@@ -3590,7 +3590,7 @@ class TestCPythonBaseImage:
assert unreviewed_source_images(instructions, reviewed) == unreviewed
def test_fixed_cves_are_not_suppressed(self):
- """CVEs that no longer apply to the pinned Python stay unsuppressed.
+ """Fixed CVEs without a reviewed catalog correction stay unsuppressed.
The fixes are included in 3.14.10. The CVE records of two others
list 3.14 as affected only below 3.14.8, although 3.14 keeps the
@@ -3607,7 +3607,6 @@ class TestCPythonBaseImage:
"CVE-2026-19672", # tarfile, fixed in 3.14.8
"CVE-2026-15806", # urllib, fixed in 3.14.8
"CVE-2026-17084", # stringprep, fixed in 3.14.8
- "CVE-2026-12345", # tempfile, fixed in 3.14.9
"CVE-2026-114583", # fixed in 3.14.10
"CVE-2026-115557", # fixed in 3.14.10
}
@@ -3619,6 +3618,9 @@ class TestCPythonBaseImage:
# 3.14 change was documentation only
"CVE-2026-3479",
}
+ # The separately guarded CVE-2026-12345 catalog correction applies
+ # only to python==3.14.10 in Grype; its exact native-rule scope and
+ # absence from Trivy are checked in test_reviewed_python_scanner_metadata.
assert not ((fixed_in_base_image | outside_record_range) & ignored)
def test_cve_2026_87910_is_not_suppressed(self):
diff --git a/tests/web/auth/test_session_epoch.py b/tests/web/auth/test_session_epoch.py
index 8cbce77ae3..b8e33b57a0 100644
--- a/tests/web/auth/test_session_epoch.py
+++ b/tests/web/auth/test_session_epoch.py
@@ -49,6 +49,25 @@ from local_deep_research.web.auth.session_manager import (
StaleLoginProofError,
)
+
+ "error_number", [None, errno.EMFILE, errno.ENFILE, errno.EAGAIN, errno.EIO]
+)
+def test_unavailable_exception_keeps_identity_out_of_rendered_diagnostics(
+ error_number,
+):
+ identity = "SYNTHETIC_ACCOUNT_MARKER"
+ failure = SessionValidationUnavailableError(identity, error_number)
+ status = "unknown" if error_number is None else str(error_number)
+ assert failure.username == identity
+ assert failure.errno == error_number
+ assert failure.args == (
+ f"session epoch temporarily unreadable (errno={status})",
+ )
+ assert identity not in str(failure)
+ assert identity not in repr(failure)
+
+
# Opt out of the autouse _durable_epoch_projection shim: these tests
# exercise the REAL epoch files and failure discipline.
pytestmark = pytest.mark.real_durable_epoch