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: Address remaining CodeQL security vulnerabilities

LearningCircuite9711ab1c68a
diff --git a/src/local_deep_research/news/api.py b/src/local_deep_research/news/api.py
index 282b8be09b..b9af6674a3 100644
--- a/src/local_deep_research/news/api.py
+++ b/src/local_deep_research/news/api.py
@@ -463,9 +463,12 @@ def get_news_feed(
"source": source,
}
- except Exception as e:
+ except Exception:
logger.exception("Error getting news feed")
- return {"error": str(e), "news_items": []}
+ return {
+ "error": "An error occurred while getting news feed",
+ "news_items": [],
+ }
def debug_research_items(user_id: str):
@@ -521,8 +524,9 @@ def debug_research_items(user_id: str):
"by_status": status_counts,
"recent_items": recent,
}
- except Exception as e:
- return {"error": str(e)}
+ except Exception:
+ logger.exception("Error in debug_research_items")
+ return {"error": "An error occurred while debugging research items"}
def get_subscription_history(
@@ -650,9 +654,12 @@ def get_subscription_history(
"total_runs": len(processed_history),
}
- except Exception as e:
+ except Exception:
logger.exception("Error getting subscription history")
- return {"error": str(e), "history": []}
+ return {
+ "error": "An error occurred while getting subscription history",
+ "history": [],
+ }
def _format_time_ago(timestamp: str) -> str:
@@ -798,9 +805,12 @@ def get_subscriptions(user_id: str) -> Dict[str, Any]:
return {"subscriptions": sub_list, "total": len(sub_list)}
- except Exception as e:
+ except Exception:
logger.exception("Error getting subscriptions")
- return {"error": str(e), "subscriptions": []}
+ return {
+ "error": "Failed to retrieve subscriptions",
+ "subscriptions": [],
+ }
def update_subscription(
@@ -905,9 +915,9 @@ def update_subscription(
},
}
- except Exception as e:
+ except Exception:
logger.exception("Error updating subscription")
- return {"error": str(e)}
+ return {"error": "An error occurred while updating the subscription"}
def create_subscription(
@@ -1036,9 +1046,12 @@ def delete_subscription(subscription_id: str) -> Dict[str, Any]:
return {"status": "success", "deleted": subscription_id}
else:
return {"error": "Subscription not found", "status": "error"}
- except Exception as e:
+ except Exception:
logger.exception("Error deleting subscription")
- return {"error": str(e), "status": "error"}
+ return {
+ "error": "An error occurred while deleting the subscription",
+ "status": "error",
+ }
def submit_feedback(card_id: str, user_id: str, vote: str) -> Dict[str, Any]: