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.

dev: codeql + ollama analysis script, upd: .gitignore

hashedviking80b1e62515fa
diff --git a/.gitignore b/.gitignore
index 51782775ea..9587824cce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -56,3 +56,9 @@ research_history.db
# Data
*.pdf
.cache
+
+# Tools
+python-db/
+js-db/
+*.sarif
+codeql_analysis_results.txt
diff --git a/src/analyze_sarif.ps1 b/src/analyze_sarif.ps1
new file mode 100644
index 0000000000..55955e7bc5
--- /dev/null
+++ b/src/analyze_sarif.ps1
@@ -0,0 +1,71 @@
+# Define paths
+$sarifPath = "python-results.sarif"
+$outputPath = "codeql_analysis_results.txt"
+
+# Check if SARIF file exists
+if (-not (Test-Path $sarifPath)) {
+ Write-Error "SARIF file not found at: $sarifPath"
+ exit 1
+}
+
+# Read SARIF content
+try {
+ $sarifContent = Get-Content $sarifPath -Raw
+} catch {
+ Write-Error "Failed to read SARIF file: $_"
+ exit 1
+}
+
+# Prepare the prompt
+$prompt = @"
+Please analyze these security findings from CodeQL analysis.
+Focus on:
+1. Critical vulnerabilities
+2. High priority issues
+3. Potential impact
+4. Recommended fixes
+
+Here is the analysis data:
+$sarifContent
+"@
+
+# Prepare the request body
+$body = @{
+ model = "deepseek-r1:32b"
+ prompt = $prompt
+} | ConvertTo-Json
+
+# Make the request to Ollama and process the streaming response
+try {
+ $response = ""
+ $request = [System.Net.WebRequest]::Create("http://localhost:11434/api/generate")
+ $request.Method = "POST"
+ $request.ContentType = "application/json"
+
+ $streamWriter = New-Object System.IO.StreamWriter($request.GetRequestStream())
+ $streamWriter.Write($body)
+ $streamWriter.Flush()
+ $streamWriter.Close()
+
+ $responseStream = $request.GetResponse().GetResponseStream()
+ $streamReader = New-Object System.IO.StreamReader($responseStream)
+
+ while (-not $streamReader.EndOfStream) {
+ $line = $streamReader.ReadLine()
+ if ($line) {
+ $jsonResponse = $line | ConvertFrom-Json
+ if ($jsonResponse.response) {
+ $response += $jsonResponse.response
+ }
+ }
+ }
+
+ # Save the processed response to a file
+ $response | Out-File -FilePath $outputPath -Encoding UTF8
+
+ Write-Host "Analysis complete. Results saved to: $outputPath"
+ Write-Host "You can view the results by opening: $outputPath"
+} catch {
+ Write-Error "Failed to analyze with Ollama: $_"
+ exit 1
+}