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): resolve scanner alerts (ws CVE, Bearer XSS FPs, Scorecard token-perms) (#4209)

LearningCircuite07171c950dc
diff --git a/.github/workflows/ui-full-shards.yml b/.github/workflows/ui-full-shards.yml
index 33c657a8c0..5ec0f281dd 100644
--- a/.github/workflows/ui-full-shards.yml
+++ b/.github/workflows/ui-full-shards.yml
@@ -36,7 +36,9 @@ jobs:
with:
strict-mode: true
permissions:
- contents: write # Needed by docker-tests pytest job for gh-pages deployment
+ # gh-pages deploy in docker-tests is gated on github.event_name == 'push' to main,
+ # which never fires from this caller (label / workflow_dispatch). So we omit
+ # contents: write here — narrower scope per OSSF Scorecard Token-Permissions.
pull-requests: write # Needed by docker-tests pytest job for PR comments
secrets:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
diff --git a/src/local_deep_research/web/static/js/services/pdf.js b/src/local_deep_research/web/static/js/services/pdf.js
index 50983e05fe..7fd88774af 100644
--- a/src/local_deep_research/web/static/js/services/pdf.js
+++ b/src/local_deep_research/web/static/js/services/pdf.js
@@ -26,10 +26,12 @@ function replaceKatexWithLatex(container) {
if (!ann) return;
const p = document.createElement('p');
p.textContent = `$$${ann.textContent}$$`;
+ // bearer:disable javascript_lang_dangerous_insert_html -- replaceWith receives a Node built via textContent, not an HTML string; no parsing occurs
el.replaceWith(p);
});
container.querySelectorAll('.katex').forEach((el) => {
const ann = el.querySelector('annotation[encoding="application/x-tex"]');
+ // bearer:disable javascript_lang_dangerous_insert_html -- replaceWith receives a TextNode via createTextNode, not an HTML string; no parsing occurs
if (ann) el.replaceWith(document.createTextNode(`$${ann.textContent}$`));
});
}