chore(deps): clear all 13 security advisories, unblock the server lint gate - #346
chore(deps): clear all 13 security advisories, unblock the server lint gate#346Pschmetzer wants to merge 2 commits into
Conversation
…t gate npm audit reported 13 advisories across the two workspaces (10 high). Both are now at zero. server 5 -> 0 client 8 -> 0 Both are resolved by a lockfile refresh alone (npm audit fix). No manifest changes, no dependency versions declared differently. Also fixed the one lint error in server/, which fails `npm run lint` (eslint . --max-warnings 0) on master and therefore blocks the CI lint gate on every PR: authMiddleware.js bound `catch (error)` without using it. Replaced with an optional catch binding. This repo is public and is used to evaluate applicants, so a red lint gate and 10 open high advisories are more visible here than elsewhere. Not addressed: client/ has 40 pre-existing lint errors, mostly unused imports. Confirmed identical on master before these changes (40 there, 40 here), so they are untouched by this. They want their own cleanup — folding them into a dependency PR would bury the security change. Verified: npm ci both workspaces, server lint clean, client vite build succeeds, npm audit 0 in both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The following CI jobs failed:
Logs: https://github.com/modelsuite-ai/modelsuite-qualification/actions/runs/31247754401 |
The test-client CI job fails on master with 40 no-unused-vars errors, all of them component imports: Sidebar, TasksTable, CreateTaskModal, AvailableTasksList, Link, Logo and so on. They are false positives. eslint.config.js loads react-hooks and react-refresh but never eslint-plugin-react, so the react/jsx-uses-vars rule is off — and without it no-unused-vars cannot tell that `<Sidebar />` is a use of the `Sidebar` import. AdminDashboard.jsx imports Sidebar on line 2 and renders it on line 67. This matters beyond the red gate: the obvious way to "fix" 40 unused imports is to delete them, which would have broken every page. eslint-plugin-react was already a declared devDependency, just not wired in. Enabled only react/jsx-uses-vars rather than react/recommended, which would have introduced a large batch of unrelated findings. That takes client lint from 40 errors to 1, and the last one is real: AuthContext.jsx exports both AuthProvider and useAuth, which react-refresh/only-export-components flags. Suppressed with a comment explaining why — it costs a full reload instead of a granular Fast Refresh update while editing that one file, and splitting the hook out would touch all seven consumers for no runtime benefit. Verified: client lint clean, vite build succeeds, server lint still clean, and Sidebar and friends are still imported and still rendered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Pushed a follow-up commit: I had written above that
All 40 are that shape —
That takes client lint from 40 errors to 1, and the last one is genuine:
Both lint gates should now be green. |
🎉 All CI Checks Passed!Tests Run:
Lines Changed: +3044 / -757 Next Steps for Reviewer:
This PR is ready for human review. |
npm auditreported 13 advisories (10 high) across the two workspaces. Both are now at zero.serverclientBoth clear on a lockfile refresh alone (
npm audit fix) — no manifest changes, no dependency versions declared differently. This was the cheapest repo in the org to fix.Also: the server lint gate was red on
masterserver/middleware/authMiddleware.js:12boundcatch (error)without using it, which failsnpm run lint(eslint . --max-warnings 0) and therefore blocks the CI lint gate on every PR here. Replaced with an optional catch binding:This repo is public and is used to evaluate applicants, so a red lint gate and 10 open high advisories are considerably more visible here than in the private repos.
Not addressed
client/has 40 pre-existing lint errors, mostly unused imports. I confirmed these are untouched by this PR by running the suite on a cleanmastercheckout — 40 there, 40 here, identical.They want their own cleanup PR. Folding a 40-error lint sweep into a dependency change would bury the security fix. Happy to do it separately.
Verification
npm ci(both workspaces)serverlintclientvite buildnpm auditservernpm auditclient🤖 Generated with Claude Code