~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
fix(security): dismiss false-positive Bearer alerts #6916 and #6020 (#2343)
LearningCircuit428108cd1456
diff --git a/.github/workflows/bearer.yml b/.github/workflows/bearer.ymlindex 09b2940672..356975d5b3 100644--- a/.github/workflows/bearer.yml+++ b/.github/workflows/bearer.yml@@ -32,6 +32,7 @@ jobs:uses: bearer/bearer-action@828eeb928ce2f4a7ca5ed57fb8b59508cb8c79bc # v2with:scanner: sast,secrets+ config-file: bearer.ymlformat: sarifoutput: bearer-results.sarifexit-code: 0 # Report findings but don't fail the builddiff --git a/src/local_deep_research/web/static/js/security/xss-protection.js b/src/local_deep_research/web/static/js/security/xss-protection.jsindex f6f1d17370..cc4793b475 100644--- a/src/local_deep_research/web/static/js/security/xss-protection.js+++ b/src/local_deep_research/web/static/js/security/xss-protection.js@@ -171,6 +171,10 @@ function safeCreateElement(tagName, text = '', attributes = {}, classNames = [])if (!SAFE_TAGS.has(normalizedTag)) {throw new Error('safeCreateElement: disallowed tag "' + tagName + '"');}+ if (!hasDOMPurify()) {+ throw new Error('safeCreateElement requires DOMPurify to be loaded');+ }+// bearer:disable javascript_lang_dangerous_insert_html — tag validated against SAFE_TAGS whitelistconst element = document.createElement(normalizedTag);@@ -178,10 +182,9 @@ function safeCreateElement(tagName, text = '', attributes = {}, classNames = [])element.textContent = text;}- // setAttribute is inherently safe per OWASP — no HTML interpretationObject.entries(attributes).forEach(([key, value]) => {if (key && value !== null && value !== undefined) {- element.setAttribute(key, String(value));+ element.setAttribute(String(key), String(value));}});@@ -189,7 +192,13 @@ function safeCreateElement(tagName, text = '', attributes = {}, classNames = [])element.className = classNames.join(' ');}- return element;+ // Let DOMPurify sanitize attributes (on*, javascript:/data: URIs, etc.)+ const clean = DOMPurify.sanitize(element.outerHTML, {+ ALLOWED_TAGS: [normalizedTag],+ RETURN_DOM_FRAGMENT: true,+ });++ return clean.firstChild || element;}/**