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: resolve shellcheck warnings in GitHub Actions workflows

LearningCircuita895836628ac
diff --git a/.github/workflows/file-whitelist-check.yml b/.github/workflows/file-whitelist-check.yml
index 60dbb03bda..01e88d9967 100644
--- a/.github/workflows/file-whitelist-check.yml
+++ b/.github/workflows/file-whitelist-check.yml
@@ -71,13 +71,13 @@ jobs:
echo "🔍 Checking all files in PR commits from $GITHUB_BASE_REF to HEAD..."
echo "🔧 DEBUG: Running git diff command..."
- CHANGED_FILES=$(git diff --name-only --diff-filter=AM origin/$GITHUB_BASE_REF..HEAD)
+ CHANGED_FILES=$(git diff --name-only --diff-filter=AM "origin/$GITHUB_BASE_REF..HEAD")
echo "🔧 DEBUG: git diff found $(echo "$CHANGED_FILES" | wc -l) files"
echo "🔧 DEBUG: Running git log command..."
# Also get newly added files across all commits in the PR
# Use a more robust approach that handles edge cases
- ALL_NEW_FILES=$(git log --name-only --pretty=format: --diff-filter=A origin/$GITHUB_BASE_REF..HEAD 2>/dev/null | grep -v '^$' | sort | uniq || echo "")
+ ALL_NEW_FILES=$(git log --name-only --pretty=format: --diff-filter=A "origin/$GITHUB_BASE_REF..HEAD" 2>/dev/null | grep -v '^$' | sort | uniq || echo "")
echo "🔧 DEBUG: git log found $(echo "$ALL_NEW_FILES" | wc -w) files"
# Combine both lists and remove duplicates - handle empty ALL_NEW_FILES
@@ -116,7 +116,8 @@ jobs:
echo "🔧 DEBUG: Starting file processing loop..."
FILE_COUNT=0
- for file in $CHANGED_FILES; do
+ while IFS= read -r file; do
+ [ -z "$file" ] && continue
FILE_COUNT=$((FILE_COUNT + 1))
echo "🔧 DEBUG: Processing file $FILE_COUNT: $file"
@@ -145,7 +146,7 @@ jobs:
if [ -f "$file" ]; then
FILE_SIZE=$(stat -c%s "$file" 2>/dev/null || echo 0)
if [ "$FILE_SIZE" -gt 1048576 ]; then
- LARGE_FILES+=("$file ($(echo $FILE_SIZE | awk '{printf "%.1fMB", $1/1024/1024}'))")
+ LARGE_FILES+=("$file ($(echo "$FILE_SIZE" | awk '{printf "%.1fMB", $1/1024/1024}'))")
fi
fi
@@ -330,7 +331,7 @@ jobs:
fi
fi
fi
- done
+ done <<< "$CHANGED_FILES"
# Report all violations with detailed explanations
echo "🔧 DEBUG: File processing completed. Checking violations..."
@@ -645,7 +646,7 @@ jobs:
if [ -f "$FILE_PATH" ]; then
FILE_SIZE=$(stat -c%s "$FILE_PATH" 2>/dev/null || echo "unknown")
if [ "$FILE_SIZE" != "unknown" ]; then
- READABLE_SIZE=$(echo $FILE_SIZE | awk '{if($1>=1048576) printf "%.1fMB", $1/1048576; else if($1>=1024) printf "%.1fKB", $1/1024; else printf "%dB", $1}')
+ READABLE_SIZE=$(echo "$FILE_SIZE" | awk '{if($1>=1048576) printf "%.1fMB", $1/1048576; else if($1>=1024) printf "%.1fKB", $1/1024; else printf "%dB", $1}')
echo " → File size: $READABLE_SIZE"
fi
fi
diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml
index def75ad1c1..ca42376eda 100644
--- a/.github/workflows/ossf-scorecard.yml
+++ b/.github/workflows/ossf-scorecard.yml
@@ -59,32 +59,32 @@ jobs:
- name: Display OSSF Scorecard summary
if: always()
run: |
- echo "## OSSF Scorecard Security Analysis" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "✅ OSSF Scorecard analysis completed" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "### What is OSSF Scorecard?" >> $GITHUB_STEP_SUMMARY
- echo "OSSF Scorecard checks your repository for security best practices including:" >> $GITHUB_STEP_SUMMARY
- echo "- **Branch Protection**: Ensures main branch has protection rules" >> $GITHUB_STEP_SUMMARY
- echo "- **Code Review**: Checks that code changes are reviewed" >> $GITHUB_STEP_SUMMARY
- echo "- **Signed Releases**: Verifies releases are cryptographically signed" >> $GITHUB_STEP_SUMMARY
- echo "- **SAST Tools**: Confirms static analysis tools are enabled" >> $GITHUB_STEP_SUMMARY
- echo "- **Dependency Updates**: Checks for automated dependency updates" >> $GITHUB_STEP_SUMMARY
- echo "- **Vulnerability Alerts**: Verifies security alerts are enabled" >> $GITHUB_STEP_SUMMARY
- echo "- **License**: Ensures repository has a license" >> $GITHUB_STEP_SUMMARY
- echo "- **CI Tests**: Checks for automated testing" >> $GITHUB_STEP_SUMMARY
- echo "- **Security Policy**: Verifies SECURITY.md exists" >> $GITHUB_STEP_SUMMARY
- echo "- **Dangerous Workflows**: Detects potentially dangerous GitHub Actions" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "📊 **Results:**" >> $GITHUB_STEP_SUMMARY
- echo "- Detailed results uploaded to GitHub Security tab" >> $GITHUB_STEP_SUMMARY
- echo "- SARIF file available in artifacts" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "🔗 **Links:**" >> $GITHUB_STEP_SUMMARY
- echo "- [Security Tab](https://github.com/${{ github.repository }}/security/code-scanning)" >> $GITHUB_STEP_SUMMARY
- echo "- [OSSF Scorecard Badge](https://securityscorecards.dev/viewer/?uri=github.com/${{ github.repository }})" >> $GITHUB_STEP_SUMMARY
- echo "" >> $GITHUB_STEP_SUMMARY
- echo "💡 **Add Badge to README:**" >> $GITHUB_STEP_SUMMARY
- echo '```markdown' >> $GITHUB_STEP_SUMMARY
- echo "[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/${{ github.repository }}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/${{ github.repository }})" >> $GITHUB_STEP_SUMMARY
- echo '```' >> $GITHUB_STEP_SUMMARY
+ echo "## OSSF Scorecard Security Analysis" >> "$GITHUB_STEP_SUMMARY"
+ echo "" >> "$GITHUB_STEP_SUMMARY"
+ echo "✅ OSSF Scorecard analysis completed" >> "$GITHUB_STEP_SUMMARY"
+ echo "" >> "$GITHUB_STEP_SUMMARY"
+ echo "### What is OSSF Scorecard?" >> "$GITHUB_STEP_SUMMARY"
+ echo "OSSF Scorecard checks your repository for security best practices including:" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Branch Protection**: Ensures main branch has protection rules" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Code Review**: Checks that code changes are reviewed" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Signed Releases**: Verifies releases are cryptographically signed" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **SAST Tools**: Confirms static analysis tools are enabled" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Dependency Updates**: Checks for automated dependency updates" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Vulnerability Alerts**: Verifies security alerts are enabled" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **License**: Ensures repository has a license" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **CI Tests**: Checks for automated testing" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Security Policy**: Verifies SECURITY.md exists" >> "$GITHUB_STEP_SUMMARY"
+ echo "- **Dangerous Workflows**: Detects potentially dangerous GitHub Actions" >> "$GITHUB_STEP_SUMMARY"
+ echo "" >> "$GITHUB_STEP_SUMMARY"
+ echo "📊 **Results:**" >> "$GITHUB_STEP_SUMMARY"
+ echo "- Detailed results uploaded to GitHub Security tab" >> "$GITHUB_STEP_SUMMARY"
+ echo "- SARIF file available in artifacts" >> "$GITHUB_STEP_SUMMARY"
+ echo "" >> "$GITHUB_STEP_SUMMARY"
+ echo "🔗 **Links:**" >> "$GITHUB_STEP_SUMMARY"
+ echo "- [Security Tab](https://github.com/${{ github.repository }}/security/code-scanning)" >> "$GITHUB_STEP_SUMMARY"
+ echo "- [OSSF Scorecard Badge](https://securityscorecards.dev/viewer/?uri=github.com/${{ github.repository }})" >> "$GITHUB_STEP_SUMMARY"
+ echo "" >> "$GITHUB_STEP_SUMMARY"
+ echo "💡 **Add Badge to README:**" >> "$GITHUB_STEP_SUMMARY"
+ echo '```markdown' >> "$GITHUB_STEP_SUMMARY"
+ echo "[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/${{ github.repository }}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/${{ github.repository }})" >> "$GITHUB_STEP_SUMMARY"
+ echo '```' >> "$GITHUB_STEP_SUMMARY"