Skip to content

fix: resolve high-severity npm advisories blocking CI - #698

Merged
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:fix/npm-audit-high-advisories
Jul 24, 2026
Merged

fix: resolve high-severity npm advisories blocking CI#698
rdmueller merged 1 commit into
LLM-Coding:mainfrom
raifdmueller:fix/npm-audit-high-advisories

Conversation

@raifdmueller

@raifdmueller raifdmueller commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Problem

The Dependency Security Audit job (npm audit --audit-level=high) fails on every PR right now, including pure documentation changes. It is not caused by any of them: new advisories were published against dependency versions that have not changed, and main's last green run is 6 days old.

Confirmed by running the audit on a clean checkout of main — the same 6 vulnerabilities, byte for byte:

6 vulnerabilities (1 low, 3 moderate, 2 high)

Fix

npm audit fix (no --force) resolves 4 of 6 within existing semver ranges. package-lock.json only — package.json is untouched.

Package From → To Severity Advisory
postcss 8.5.14 → 8.5.23 high GHSA-r28c-9q8g-f849 — path traversal in source-map auto-loading
brace-expansion 5.0.6 → 5.0.8 high GHSA-3jxr-9vmj-r5cp — ReDoS
echarts 6.0.0 → 6.1.0 moderate GHSA-fgmj-fm8m-jvvx — XSS
body-parser 1.20.5 → 1.20.6 low GHSA-v422-hmwv-36x6 — DoS

echarts is the only runtime dependency in that list, so it got the most attention below.

What is left, deliberately

Two moderate uuid advisories reached through @lhci/cli (dev-only Lighthouse tooling). Clearing them requires npm audit fix --force, which downgrades to @lhci/cli@0.6.1 — a breaking change to the Lighthouse job for a moderate issue in a tool that never runs in production. Moderate does not trip the --audit-level=high gate, so CI goes green without it.

Also: untrack Playwright run artifacts

website/playwright-report/index.html and website/test-results/.last-run.json are tracked, and every npm run test:e2e rewrites them. They dirty the working tree and block branch switches mid-test. Added to .gitignore and removed from the index — this is the same "no build artifacts in commits" rule #695 added to the reviewer checklist.

Verification

  • npm audit --audit-level=high → passes
  • npm run lint → clean
  • npm test → 121/121
  • npm run test:e2e → 38/38 (run twice; an earlier run showed 3 failures in the card-grid modal specs, which reproduce on unmodified main under concurrent load and pass in isolation — flakiness, not the echarts bump)
  • npm run build → green

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Playwright-Testberichte und generierte Testergebnisse werden künftig von der Versionsverwaltung ausgeschlossen.

`npm audit --audit-level=high` started failing on every PR after new
advisories were published against dependency versions that had not changed;
main's last green run predates them. Confirmed identical on a clean checkout
of main, so this is not caused by any open PR.

`npm audit fix` (no --force) resolves 4 of 6 within existing semver ranges —
package-lock.json only, package.json untouched:

- postcss    8.5.14 → 8.5.23  (high — path traversal, GHSA-r28c-9q8g-f849)
- brace-expansion 5.0.6 → 5.0.8 (high — ReDoS, GHSA-3jxr-9vmj-r5cp)
- echarts    6.0.0  → 6.1.0   (moderate — XSS, GHSA-fgmj-fm8m-jvvx)
- body-parser 1.20.5 → 1.20.6 (low — DoS, GHSA-v422-hmwv-36x6)

The 2 remaining are moderate `uuid` advisories reached through @lhci/cli
(dev-only Lighthouse tooling); clearing them needs a breaking downgrade to
@lhci/cli@0.6.1, and moderate does not trip the --audit-level=high gate.

Also untrack playwright-report/ and test-results/, which every `npm run
test:e2e` rewrites — they made the working tree dirty and blocked branch
switches mid-test.

Verified: lint clean, 121/121 unit, 38/38 E2E, build green with the bumped
echarts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3e5847d8-1054-491d-9b2e-70fcd9194b0f

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca7f95 and d63e981.

⛔ Files ignored due to path filters (1)
  • website/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • website/.gitignore
  • website/playwright-report/index.html
  • website/test-results/.last-run.json
💤 Files with no reviewable changes (1)
  • website/test-results/.last-run.json

Walkthrough

Die Website-Gitignore-Datei ignoriert künftig die von Playwright erzeugten Verzeichnisse playwright-report/ und test-results/.

Changes

Playwright-Artefakte

Layer / File(s) Zusammenfassung
Playwright-Ausgaben ignorieren
website/.gitignore
Die Gitignore-Datei wurde um playwright-report/ und test-results/ ergänzt.

Estimated code review effort: 1 (Trivial) | ~2 Minuten

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Der Titel beschreibt treffend die Hauptänderung: Behebung hochkritischer npm-Advisories zur CI-Stabilisierung.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rdmueller
rdmueller merged commit 2da84d0 into LLM-Coding:main Jul 24, 2026
8 checks passed
@raifdmueller
raifdmueller deleted the fix/npm-audit-high-advisories branch July 24, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants