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(ci): expand npm audit to cover all test package.json files (#3259)

LearningCircuit92b91a3dd353
diff --git a/.github/workflows/npm-audit.yml b/.github/workflows/npm-audit.yml
index 1b44dee36a..41ec9bda6e 100644
--- a/.github/workflows/npm-audit.yml
+++ b/.github/workflows/npm-audit.yml
@@ -28,42 +28,35 @@ jobs:
with:
node-version: '24'
- - name: Run npm audit on root
- id: audit-root
+ - name: Run npm audit on all package.json locations
run: |
- echo "=== Running npm audit on root package.json ==="
- if [ -f "package.json" ]; then
- # Require committed lockfile for reproducible security audits
- if [ ! -f "package-lock.json" ]; then
- echo "::error::Missing package-lock.json. Please commit your lockfile for security audits."
- echo "AUDIT_FAILED=true" >> "$GITHUB_ENV"
- else
- npm audit --audit-level=moderate || echo "AUDIT_FAILED=true" >> "$GITHUB_ENV"
+ FAILED=false
+ # Audit root and every test directory that contains a package.json
+ DIRS=(
+ .
+ tests
+ tests/ui_tests
+ tests/ui_tests/playwright
+ tests/accessibility_tests
+ tests/api_tests_with_login
+ tests/infrastructure_tests
+ tests/puppeteer
+ )
+ for dir in "${DIRS[@]}"; do
+ echo "=== Running npm audit on ${dir} ==="
+ if [ ! -f "${dir}/package.json" ]; then
+ echo "No package.json found in ${dir}"
+ continue
fi
- 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
# Require committed lockfile for reproducible security audits
- if [ ! -f "package-lock.json" ]; then
- echo "::error::Missing tests/ui_tests/package-lock.json. Please commit your lockfile for security audits."
- echo "AUDIT_UI_FAILED=true" >> "$GITHUB_ENV"
- else
- npm audit --audit-level=moderate || echo "AUDIT_UI_FAILED=true" >> "$GITHUB_ENV"
+ if [ ! -f "${dir}/package-lock.json" ]; then
+ echo "::error::Missing ${dir}/package-lock.json. Please commit your lockfile for security audits."
+ FAILED=true
+ continue
fi
- 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
+ (cd "${dir}" && npm audit --audit-level=moderate) || FAILED=true
+ done
+ if [[ "$FAILED" == "true" ]]; then
echo "❌ npm audit found moderate or higher severity vulnerabilities"
echo "Run 'npm audit fix' locally to resolve issues"
exit 1