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.

ci: Add Retire.js for JavaScript vulnerability scanning

LearningCircuite84d12cd50fe
diff --git a/.github/workflows/retirejs.yml b/.github/workflows/retirejs.yml
new file mode 100644
index 0000000000..b6ea8bec5e
--- /dev/null
+++ b/.github/workflows/retirejs.yml
@@ -0,0 +1,79 @@
+name: Retire.js Security Scan
+
+on:
+ pull_request:
+ branches: [main, dev, develop]
+ paths:
+ - '**.js'
+ - '**.ts'
+ - '**.jsx'
+ - '**.tsx'
+ - 'package.json'
+ - 'package-lock.json'
+ push:
+ branches: [main]
+ paths:
+ - '**.js'
+ - '**.ts'
+ - '**.jsx'
+ - '**.tsx'
+ - 'package.json'
+ - 'package-lock.json'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ security-events: write
+
+jobs:
+ retirejs:
+ name: Retire.js Vulnerability Scan
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Install Retire.js
+ run: npm install -g retire
+
+ - name: Run Retire.js scan
+ id: retire-scan
+ continue-on-error: true
+ run: |
+ echo "=== Running Retire.js scan ==="
+ # Scan JavaScript files for known vulnerabilities
+ # --js: scan JavaScript files
+ # --node: scan node_modules
+ # --outputformat: output in SARIF format for GitHub Security
+ retire --js --node --outputformat sarif --outputpath retire-results.sarif || true
+
+ # Also output human-readable format
+ echo ""
+ echo "=== Human-readable output ==="
+ retire --js --node || echo "RETIRE_FOUND_ISSUES=true" >> "$GITHUB_ENV"
+
+ - name: Upload SARIF results
+ uses: github/codeql-action/upload-sarif@v3
+ if: always()
+ with:
+ sarif_file: retire-results.sarif
+ category: retirejs
+ continue-on-error: true
+
+ - name: Check scan results
+ run: |
+ if [[ "$RETIRE_FOUND_ISSUES" == "true" ]]; then
+ echo "⚠️ Retire.js found potentially vulnerable JavaScript libraries"
+ echo "Review the Security tab for details"
+ echo "Consider updating or replacing affected libraries"
+ # Note: We don't fail the build as some findings may be false positives
+ # or in development dependencies only
+ else
+ echo "✅ No known vulnerable JavaScript libraries detected"
+ fi