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: suppress CodeQL false positive for verified file writes

LearningCircuita5c086edb437
diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml
new file mode 100644
index 0000000000..1711cc7cdc
--- /dev/null
+++ b/.github/codeql/codeql-config.yml
@@ -0,0 +1,14 @@
+name: "CodeQL Config"
+
+# Paths to ignore
+paths-ignore:
+ - '**/tests/**'
+ - '**/test_*.py'
+ - '**/*_test.py'
+
+# Query filters
+query-filters:
+ - exclude:
+ id: py/clear-text-storage-sensitive-data
+ paths:
+ - src/local_deep_research/security/file_write_verifier.py
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 2896469d99..41d95ac091 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -71,6 +71,7 @@ jobs:
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
+ config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
diff --git a/src/local_deep_research/security/file_write_verifier.py b/src/local_deep_research/security/file_write_verifier.py
index d88ab177c8..2821547999 100644
--- a/src/local_deep_research/security/file_write_verifier.py
+++ b/src/local_deep_research/security/file_write_verifier.py
@@ -99,18 +99,16 @@ def write_file_verified(
# Handle binary mode separately (no encoding parameter)
if "b" in mode:
with open(filepath, mode) as f:
- # lgtm[py/clear-text-storage-sensitive-data]
- # CodeQL suppression: This is a security-verified file write utility.
+ # This is a security-verified file write utility.
# Content is only written after explicit authorization check via settings.
# The authorization check ensures only permitted file operations proceed.
- f.write(content)
+ f.write(content) # nosec B102
else:
with open(filepath, mode, encoding=encoding) as f:
- # lgtm[py/clear-text-storage-sensitive-data]
- # CodeQL suppression: This is a security-verified file write utility.
+ # This is a security-verified file write utility.
# Content is only written after explicit authorization check via settings.
# The authorization check ensures only permitted file operations proceed.
- f.write(content)
+ f.write(content) # nosec B102
logger.debug(
f"Verified file write: {filepath} (setting: {setting_name}={required_value})"