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 remaining shellcheck violations identified in CI

LearningCircuite641bcf5a12d
diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml
index cd3e27f7e0..79ae218804 100644
--- a/.github/workflows/devskim.yml
+++ b/.github/workflows/devskim.yml
@@ -49,44 +49,46 @@ jobs:
- name: Generate summary
run: |
- echo "## DevSkim Security Linter Summary" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "✅ DevSkim security scan completed" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "### What was scanned:" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🔍 All source code in the repository" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🛡️ Common security issues and anti-patterns" >> "$GITHUB_STEP_SUMMARY"
- echo "- 📋 Insecure coding practices" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🔑 Hardcoded secrets and credentials" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "### Security checks include:" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Hardcoded Credentials**: Passwords, API keys, tokens" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Insecure Functions**: Dangerous API usage" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Buffer Overflows**: Memory safety issues" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Crypto Issues**: Weak encryption practices" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Network Security**: Insecure protocols and configurations" >> "$GITHUB_STEP_SUMMARY"
- echo "- **File System**: Insecure file operations" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Input Validation**: Missing input sanitization" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "### Language Support:" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🐍 Python (.py files)" >> "$GITHUB_STEP_SUMMARY"
- echo "- 📜 JavaScript/TypeScript (.js, .ts files)" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🖥️ C/C++ (.c, .cpp, .h files)" >> "$GITHUB_STEP_SUMMARY"
- echo "- 🔷 C# (.cs files)" >> "$GITHUB_STEP_SUMMARY"
- echo "- 📝 More languages supported" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "### Why DevSkim?" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Microsoft Maintained**: Backed by Microsoft security team" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Truly Free**: No registration, no API keys, no upsells" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Fast & Lightweight**: Quick scans with minimal overhead" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Comprehensive Rules**: 200+ security rules" >> "$GITHUB_STEP_SUMMARY"
- echo "- **Open Source**: Community-driven rule improvements" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "📊 **Results uploaded to:**" >> "$GITHUB_STEP_SUMMARY"
- echo "- GitHub Security tab (if issues found)" >> "$GITHUB_STEP_SUMMARY"
- echo "- Workflow artifacts (SARIF files)" >> "$GITHUB_STEP_SUMMARY"
- echo "" >> "$GITHUB_STEP_SUMMARY"
- echo "🔗 **Learn more about DevSkim:**" >> "$GITHUB_STEP_SUMMARY"
- echo "- [DevSkim GitHub](https://github.com/microsoft/DevSkim)" >> "$GITHUB_STEP_SUMMARY"
- echo "- [DevSkim Documentation](https://microsoft.github.io/DevSkim/)" >> "$GITHUB_STEP_SUMMARY"
- echo "- [DevSkim Rules](https://github.com/microsoft/DevSkim/tree/main/rules)" >> "$GITHUB_STEP_SUMMARY"
+ {
+ echo "## DevSkim Security Linter Summary"
+ echo ""
+ echo "✅ DevSkim security scan completed"
+ echo ""
+ echo "### What was scanned:"
+ echo "- 🔍 All source code in the repository"
+ echo "- 🛡️ Common security issues and anti-patterns"
+ echo "- 📋 Insecure coding practices"
+ echo "- 🔑 Hardcoded secrets and credentials"
+ echo ""
+ echo "### Security checks include:"
+ echo "- **Hardcoded Credentials**: Passwords, API keys, tokens"
+ echo "- **Insecure Functions**: Dangerous API usage"
+ echo "- **Buffer Overflows**: Memory safety issues"
+ echo "- **Crypto Issues**: Weak encryption practices"
+ echo "- **Network Security**: Insecure protocols and configurations"
+ echo "- **File System**: Insecure file operations"
+ echo "- **Input Validation**: Missing input sanitization"
+ echo ""
+ echo "### Language Support:"
+ echo "- 🐍 Python (.py files)"
+ echo "- 📜 JavaScript/TypeScript (.js, .ts files)"
+ echo "- 🖥️ C/C++ (.c, .cpp, .h files)"
+ echo "- 🔷 C# (.cs files)"
+ echo "- 📝 More languages supported"
+ echo ""
+ echo "### Why DevSkim?"
+ echo "- **Microsoft Maintained**: Backed by Microsoft security team"
+ echo "- **Truly Free**: No registration, no API keys, no upsells"
+ echo "- **Fast & Lightweight**: Quick scans with minimal overhead"
+ echo "- **Comprehensive Rules**: 200+ security rules"
+ echo "- **Open Source**: Community-driven rule improvements"
+ echo ""
+ echo "📊 **Results uploaded to:**"
+ echo "- GitHub Security tab (if issues found)"
+ echo "- Workflow artifacts (SARIF files)"
+ echo ""
+ echo "🔗 **Learn more about DevSkim:**"
+ echo "- [DevSkim GitHub](https://github.com/microsoft/DevSkim)"
+ echo "- [DevSkim Documentation](https://microsoft.github.io/DevSkim/)"
+ echo "- [DevSkim Rules](https://github.com/microsoft/DevSkim/tree/main/rules)"
+ } >> "$GITHUB_STEP_SUMMARY"
diff --git a/.github/workflows/file-whitelist-check.yml b/.github/workflows/file-whitelist-check.yml
index cddd6562c1..d223050c46 100644
--- a/.github/workflows/file-whitelist-check.yml
+++ b/.github/workflows/file-whitelist-check.yml
@@ -94,7 +94,7 @@ jobs:
echo "🔧 DEBUG: Files to check:"
echo "$CHANGED_FILES" | head -10
- if [ $(echo "$CHANGED_FILES" | wc -l) -gt 10 ]; then
+ if [ "$(echo "$CHANGED_FILES" | wc -l)" -gt 10 ]; then
echo "🔧 DEBUG: ... and $(echo "$CHANGED_FILES" | wc -l | awk '{print $1-10}') more files"
fi
diff --git a/.github/workflows/news-tests.yml b/.github/workflows/news-tests.yml
index 16abe59714..d1285442cd 100644
--- a/.github/workflows/news-tests.yml
+++ b/.github/workflows/news-tests.yml
@@ -56,7 +56,7 @@ jobs:
- name: Start server
run: |
export LDR_USE_FALLBACK_LLM=true
- export PYTHONPATH=$PWD/src:$PYTHONPATH
+ export PYTHONPATH="$PWD"/src:$PYTHONPATH
pdm run python -m local_deep_research.web.app &
echo $! > server.pid
@@ -97,5 +97,5 @@ jobs:
if: always()
run: |
if [ -f server.pid ]; then
- kill $(cat server.pid) || true
+ kill "$(cat server.pid)" || true
fi
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index f46a2a679d..7bb0824190 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -34,7 +34,7 @@ jobs:
- name: Determine version
id: version
run: |
- if [[ "${{ github.event_name }}" = "push" && "${{ github.ref }}" == refs/tags/* ]]; then
+ if [[ "${{ github.event_name }}" = "push" && "${{ github.ref }}" =~ ^refs/tags/ ]]; then
# Extract version from tag (remove 'v' prefix)
VERSION="${GITHUB_REF#refs/tags/v}"
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.ref }}" = "refs/heads/main" ]; then
diff --git a/.github/workflows/sync-main-to-dev.yml b/.github/workflows/sync-main-to-dev.yml
index b5f884c2c7..702c296f1a 100644
--- a/.github/workflows/sync-main-to-dev.yml
+++ b/.github/workflows/sync-main-to-dev.yml
@@ -87,9 +87,11 @@ jobs:
# Get list of conflicted files
CONFLICTED_FILES=$(git diff --name-only --diff-filter=U)
- echo "conflicted_files<<EOF" >> "$GITHUB_OUTPUT"
- echo "$CONFLICTED_FILES" >> "$GITHUB_OUTPUT"
- echo "EOF" >> "$GITHUB_OUTPUT"
+ {
+ echo "conflicted_files<<EOF"
+ echo "$CONFLICTED_FILES"
+ echo "EOF"
+ } >> "$GITHUB_OUTPUT"
# Abort the merge for now
git merge --abort
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ecc148463c..a802af070d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -32,7 +32,7 @@ jobs:
- name: Run unit tests only
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-e LDR_USE_FALLBACK_LLM=true \
-e LDR_TESTING_WITH_MOCKS=true \
-w /app \
@@ -77,7 +77,7 @@ jobs:
- name: Run Python infrastructure tests
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-w /app \
ldr-test \
sh -c "pytest tests/infrastructure_tests/test_*.py -v"
@@ -102,7 +102,7 @@ jobs:
- name: Run CI test profile
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-e LDR_USE_FALLBACK_LLM=true \
-e LDR_TESTING_WITH_MOCKS=true \
-w /app \
@@ -128,7 +128,7 @@ jobs:
- name: Run text optimization tests
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-e LDR_USE_FALLBACK_LLM=true \
-e LDR_TESTING_WITH_MOCKS=true \
-w /app \
@@ -154,7 +154,7 @@ jobs:
- name: Run extended pytest suite
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-e LDR_USE_FALLBACK_LLM=true \
-e LDR_TESTING_WITH_MOCKS=true \
-e CI=true \
@@ -230,7 +230,7 @@ jobs:
- name: Run UI tests
run: |
docker run --rm \
- -v $PWD:/app \
+ -v "$PWD":/app \
-e LDR_USE_FALLBACK_LLM=true \
-e LDR_TESTING_WITH_MOCKS=true \
-e CI=true \