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: Address AI reviewer feedback for Retire.js workflow

LearningCircuitfc99ed9e7a30
diff --git a/.github/workflows/retirejs.yml b/.github/workflows/retirejs.yml
index b6ea8bec5e..324293f7a0 100644
--- a/.github/workflows/retirejs.yml
+++ b/.github/workflows/retirejs.yml
@@ -8,6 +8,8 @@ on:
- '**.ts'
- '**.jsx'
- '**.tsx'
+ - '**.mjs'
+ - '**.cjs'
- 'package.json'
- 'package-lock.json'
push:
@@ -17,6 +19,8 @@ on:
- '**.ts'
- '**.jsx'
- '**.tsx'
+ - '**.mjs'
+ - '**.cjs'
- 'package.json'
- 'package-lock.json'
workflow_dispatch:
@@ -25,6 +29,10 @@ permissions:
contents: read
security-events: write
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
jobs:
retirejs:
name: Retire.js Vulnerability Scan
@@ -35,32 +43,32 @@ jobs:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup Node.js
- uses: actions/setup-node@v4
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 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
+ # Use npx with specific version for reproducible builds
+ # Scan JavaScript files and node_modules for known vulnerabilities
+ # Output both SARIF (for GitHub Security) and human-readable format
+ npx [email protected] --js --node --outputformat sarif --outputpath retire-results.sarif 2>&1 | tee retire-output.txt || true
+
+ # Check if vulnerabilities were found (exit code handling)
+ if grep -q "vulnerability" retire-output.txt 2>/dev/null; then
+ echo "RETIRE_FOUND_ISSUES=true" >> "$GITHUB_ENV"
+ fi
- # Also output human-readable format
+ # Display human-readable summary
echo ""
- echo "=== Human-readable output ==="
- retire --js --node || echo "RETIRE_FOUND_ISSUES=true" >> "$GITHUB_ENV"
+ echo "=== Scan Summary ==="
+ cat retire-output.txt || true
- name: Upload SARIF results
uses: github/codeql-action/upload-sarif@v3
- if: always()
+ if: always() && hashFiles('retire-results.sarif') != ''
with:
sarif_file: retire-results.sarif
category: retirejs