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: use inline DevSkim suppression comments on same line as issues

LearningCircuit5a725665bfb9
diff --git a/src/local_deep_research/advanced_search_system/strategies/topic_organization_strategy.py b/src/local_deep_research/advanced_search_system/strategies/topic_organization_strategy.py
index f5697cf051..1dfe277592 100644
--- a/src/local_deep_research/advanced_search_system/strategies/topic_organization_strategy.py
+++ b/src/local_deep_research/advanced_search_system/strategies/topic_organization_strategy.py
@@ -169,11 +169,10 @@ class TopicOrganizationStrategy(BaseSearchStrategy):
# Shuffle sources to avoid ordering bias in topic organization
# Note: random.shuffle is used here for non-security purposes (preventing ML bias)
- # DevSkim: ignore DS148264 - Using standard random for ML data shuffling, not security
sources_to_process = (
sources_to_process.copy()
) # Create a copy to avoid modifying original
- random.shuffle(sources_to_process)
+ random.shuffle(sources_to_process) # DevSkim: ignore DS148264
logger.info(
f"Processing {len(sources_to_process)} sources iteratively for topic organization (shuffled)"
diff --git a/src/local_deep_research/database/views/library_views.py b/src/local_deep_research/database/views/library_views.py
index ea43626c2e..dcd795257a 100644
--- a/src/local_deep_research/database/views/library_views.py
+++ b/src/local_deep_research/database/views/library_views.py
@@ -46,10 +46,10 @@ def create_library_views(session: Session):
rr.content_preview,
rr.resource_metadata,
- -- Extract domain from URL
+ -- Extract domain from URL (DevSkim: ignore DS137138 - URL pattern matching)
CASE
- WHEN rr.url LIKE 'http://%' THEN
- SUBSTRING(rr.url FROM 'http://([^/]+)')
+ WHEN rr.url LIKE 'http://%' THEN -- DevSkim: ignore DS137138
+ SUBSTRING(rr.url FROM 'http://([^/]+)') -- DevSkim: ignore DS137138
WHEN rr.url LIKE 'https://%' THEN
SUBSTRING(rr.url FROM 'https://([^/]+)')
ELSE NULL
@@ -97,8 +97,8 @@ def create_library_views(session: Session):
INNER JOIN research_history rh ON ld.research_id = rh.id
LEFT JOIN domain_classifications dc ON
dc.domain = CASE
- WHEN rr.url LIKE 'http://%' THEN
- SUBSTRING(rr.url FROM 'http://([^/]+)')
+ WHEN rr.url LIKE 'http://%' THEN -- DevSkim: ignore DS137138
+ SUBSTRING(rr.url FROM 'http://([^/]+)') -- DevSkim: ignore DS137138
WHEN rr.url LIKE 'https://%' THEN
SUBSTRING(rr.url FROM 'https://([^/]+)')
ELSE NULL
@@ -136,11 +136,11 @@ def create_library_views(session: Session):
SUM(ld.file_size) as total_size_bytes,
AVG(ld.file_size) as avg_size_bytes,
- -- Domain breakdown
+ -- Domain breakdown (DevSkim: ignore DS137138 - URL pattern matching)
COUNT(DISTINCT
CASE
- WHEN rr.url LIKE 'http://%' THEN
- SUBSTRING(rr.url FROM 'http://([^/]+)')
+ WHEN rr.url LIKE 'http://%' THEN -- DevSkim: ignore DS137138
+ SUBSTRING(rr.url FROM 'http://([^/]+)') -- DevSkim: ignore DS137138
WHEN rr.url LIKE 'https://%' THEN
SUBSTRING(rr.url FROM 'https://([^/]+)')
ELSE NULL
@@ -172,9 +172,10 @@ def create_library_views(session: Session):
domain_download_stats_view = """
CREATE OR REPLACE VIEW domain_download_stats AS
SELECT
+ -- DevSkim: ignore DS137138 - URL pattern matching for domain extraction
CASE
- WHEN rr.url LIKE 'http://%' THEN
- SUBSTRING(rr.url FROM 'http://([^/]+)')
+ WHEN rr.url LIKE 'http://%' THEN -- DevSkim: ignore DS137138
+ SUBSTRING(rr.url FROM 'http://([^/]+)') -- DevSkim: ignore DS137138
WHEN rr.url LIKE 'https://%' THEN
SUBSTRING(rr.url FROM 'https://([^/]+)')
ELSE 'unknown'
@@ -200,8 +201,8 @@ def create_library_views(session: Session):
INNER JOIN research_resources rr ON ld.resource_id = rr.id
LEFT JOIN domain_classifications dc ON
dc.domain = CASE
- WHEN rr.url LIKE 'http://%' THEN
- SUBSTRING(rr.url FROM 'http://([^/]+)')
+ WHEN rr.url LIKE 'http://%' THEN -- DevSkim: ignore DS137138
+ SUBSTRING(rr.url FROM 'http://([^/]+)') -- DevSkim: ignore DS137138
WHEN rr.url LIKE 'https://%' THEN
SUBSTRING(rr.url FROM 'https://([^/]+)')
ELSE NULL
diff --git a/src/local_deep_research/research_library/downloaders/arxiv.py b/src/local_deep_research/research_library/downloaders/arxiv.py
index f756f24f01..51648f884e 100644
--- a/src/local_deep_research/research_library/downloaders/arxiv.py
+++ b/src/local_deep_research/research_library/downloaders/arxiv.py
@@ -170,11 +170,10 @@ class ArxivDownloader(BaseDownloader):
root = ET.fromstring(response.text)
- # Define namespaces
- # DevSkim: ignore DS137138 - XML namespace URIs are identifiers, not URLs to fetch
+ # Define namespaces (URIs are identifiers, not URLs to fetch)
ns = {
- "atom": "http://www.w3.org/2005/Atom",
- "arxiv": "http://arxiv.org/schemas/atom",
+ "atom": "http://www.w3.org/2005/Atom", # DevSkim: ignore DS137138
+ "arxiv": "http://arxiv.org/schemas/atom", # DevSkim: ignore DS137138
}
# Find the entry
diff --git a/src/local_deep_research/security/url_builder.py b/src/local_deep_research/security/url_builder.py
index 1ea05cd989..eafffde766 100644
--- a/src/local_deep_research/security/url_builder.py
+++ b/src/local_deep_research/security/url_builder.py
@@ -70,8 +70,7 @@ def build_base_url_from_settings(
# Use HTTP for host/port combinations (typically internal server addresses)
# For external URLs, users should configure external_url setting instead
- # DevSkim: ignore DS137138 - HTTP is intentional for local dev server addresses
- base_url = f"http://{normalized_host}:{int(port)}"
+ base_url = f"http://{normalized_host}:{int(port)}" # DevSkim: ignore DS137138
logger.debug(f"Constructed URL from host/port: {base_url}")
return base_url
diff --git a/src/local_deep_research/security/url_validator.py b/src/local_deep_research/security/url_validator.py
index b23827f744..7c91601f0a 100644
--- a/src/local_deep_research/security/url_validator.py
+++ b/src/local_deep_research/security/url_validator.py
@@ -126,8 +126,7 @@ class URLValidator:
if require_scheme:
return False
# If no scheme is required, assume http/https for URL parsing
- # DevSkim: ignore DS137138 - HTTP prefix used for URL parsing fallback
- parsed = urlparse(f"http://{url}")
+ parsed = urlparse(f"http://{url}") # DevSkim: ignore DS137138
scheme_lower = parsed.scheme.lower()