~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: Add missing file-whitelist-check.sh script
LearningCircuit2cd9cd607f78
diff --git a/.pre-commit-hooks/file-whitelist-check.sh b/.pre-commit-hooks/file-whitelist-check.shnew file mode 100755index 0000000000..be49997613--- /dev/null+++ b/.pre-commit-hooks/file-whitelist-check.sh@@ -0,0 +1,110 @@+#!/bin/bash+# Pre-commit hook adapted from GitHub workflow file-whitelist-check.yml+# Only checks the files being committed, not all files++# Define allowed file extensions and specific files+ALLOWED_PATTERNS=(+ "\.py$"+ "\.js$"+ "\.html$"+ "\.css$"+ "\.json$"+ "\.md$"+ "\.yml$"+ "\.yaml$"+ "\.sh$"+ "\.cfg$"+ "\.flake8$"+ "\.ipynb$"+ "\.template$"+ "^\.gitignore$"+ "^\.gitkeep$"+ ".*\.gitkeep$"+ ".*\.gitignore$"+ "^\.pre-commit-config\.yaml$"+ "^\.isort\.cfg$"+ "^\.coveragerc$"+ "^\.secrets\.baseline$"+ "^pytest\.ini$"+ "^LICENSE$"+ "^README$"+ "^README\.md$"+ "^CONTRIBUTING\.md$"+ "^SECURITY\.md$"+ "^Dockerfile$"+ "^pyproject\.toml$"+ "^pdm\.lock$"+ "^package\.json$"+ "^MANIFEST\.in$"+ "^\.github/CODEOWNERS$"+ "^\.github/.*\.(yml|yaml|md)$"+ "installers/.*\.(bat|ps1|iss|ico)$"+ "docs/.*\.(png|jpg|jpeg|gif|svg)$"+ "docs/.*\.ps1$"+ "src/local_deep_research/web/static/sounds/.*\.mp3$"+)++WHITELIST_VIOLATIONS=()+LARGE_FILES=()++echo "🔍 Running file whitelist security checks..."++# Process each file passed as argument+for file in "$@"; do+ # Skip if file doesn't exist (deleted files)+ if [ ! -f "$file" ]; then+ continue+ fi++ # 1. Whitelist check+ ALLOWED=false+ for pattern in "${ALLOWED_PATTERNS[@]}"; do+ if echo "$file" | grep -qE "$pattern"; then+ ALLOWED=true+ break+ fi+ done++ if [ "$ALLOWED" = "false" ]; then+ WHITELIST_VIOLATIONS+=("$file")+ fi++ # 2. Large file check (>1MB)+ FILE_SIZE=$(stat -c%s "$file" 2>/dev/null || stat -f%z "$file" 2>/dev/null || echo 0)+ if [ "$FILE_SIZE" -gt 1048576 ]; then+ LARGE_FILES+=("$file ($(echo $FILE_SIZE | awk '{printf "%.1fMB", $1/1024/1024}'))")+ fi+done++# Report violations+TOTAL_VIOLATIONS=0++if [ ${#WHITELIST_VIOLATIONS[@]} -gt 0 ]; then+ echo ""+ echo "❌ WHITELIST VIOLATIONS - File types not allowed in repository:"+ for violation in "${WHITELIST_VIOLATIONS[@]}"; do+ echo " 🚫 $violation"+ done+ TOTAL_VIOLATIONS=$((TOTAL_VIOLATIONS + ${#WHITELIST_VIOLATIONS[@]}))+fi++if [ ${#LARGE_FILES[@]} -gt 0 ]; then+ echo ""+ echo "❌ LARGE FILES (>1MB) - Files too big for repository:"+ for violation in "${LARGE_FILES[@]}"; do+ echo " 📏 $violation"+ done+ TOTAL_VIOLATIONS=$((TOTAL_VIOLATIONS + ${#LARGE_FILES[@]}))+fi++if [ $TOTAL_VIOLATIONS -eq 0 ]; then+ echo "✅ All file whitelist checks passed!"+ exit 0+else+ echo ""+ echo "💡 To fix these issues:"+ echo " - Add allowed file types to ALLOWED_PATTERNS"+ echo " - Use Git LFS for large files"+ echo ""+ exit 1+fi