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 npm audit to PR checks (#1139)

LearningCircuitf523c9e1f4f8
diff --git a/.github/workflows/npm-audit.yml b/.github/workflows/npm-audit.yml
new file mode 100644
index 0000000000..346995b731
--- /dev/null
+++ b/.github/workflows/npm-audit.yml
@@ -0,0 +1,69 @@
+name: npm Security Audit
+
+on:
+ pull_request:
+ branches: [main, dev, develop]
+ paths:
+ - 'package.json'
+ - 'package-lock.json'
+ - 'tests/ui_tests/package.json'
+ - 'tests/ui_tests/package-lock.json'
+ - '**.js'
+ - '**.ts'
+ - '**.jsx'
+ - '**.tsx'
+ push:
+ branches: [main, dev, develop]
+ paths:
+ - 'package.json'
+ - 'package-lock.json'
+ - 'tests/ui_tests/package.json'
+ - 'tests/ui_tests/package-lock.json'
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+jobs:
+ npm-audit:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+
+ steps:
+ - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Run npm audit on root
+ id: audit-root
+ run: |
+ echo "=== Running npm audit on root package.json ==="
+ if [ -f "package.json" ]; then
+ npm audit --audit-level=moderate || echo "AUDIT_FAILED=true" >> "$GITHUB_ENV"
+ else
+ echo "No package.json found in root"
+ fi
+
+ - name: Run npm audit on ui_tests
+ id: audit-ui-tests
+ run: |
+ echo "=== Running npm audit on tests/ui_tests ==="
+ if [ -f "tests/ui_tests/package.json" ]; then
+ cd tests/ui_tests
+ npm audit --audit-level=moderate || echo "AUDIT_UI_FAILED=true" >> "$GITHUB_ENV"
+ else
+ echo "No package.json found in tests/ui_tests"
+ fi
+
+ - name: Check audit results
+ run: |
+ if [[ "$AUDIT_FAILED" == "true" ]] || [[ "$AUDIT_UI_FAILED" == "true" ]]; then
+ echo "❌ npm audit found moderate or higher severity vulnerabilities"
+ echo "Run 'npm audit fix' locally to resolve issues"
+ exit 1
+ else
+ echo "✅ No moderate or higher severity vulnerabilities found"
+ fi