Skip to content

Security and dependency updates (Phase 1 & 2)#72

Open
yepzdk wants to merge 2 commits intodevelopfrom
feature/dependency-security-updates
Open

Security and dependency updates (Phase 1 & 2)#72
yepzdk wants to merge 2 commits intodevelopfrom
feature/dependency-security-updates

Conversation

@yepzdk
Copy link
Contributor

@yepzdk yepzdk commented Feb 24, 2026

Summary

  • Resolve 8 out of 17 security vulnerabilities (vite, ajv, js-yaml CVEs)
  • Migrate ESLint v8 → v9 with flat config, eliminating the old dependency chain that caused 14 high-severity minimatch audit warnings
  • Update React, Prettier, and other safe-to-update dependencies
  • Remove unused CRA leftovers (Babel presets, .babelrc)

Vulnerability summary

Before After
High 14 9 (all minimatch in dev-only transitive deps)
Moderate 3 0
Total 17 9

The remaining 9 are minimatch ReDoS in transitive dependencies of ESLint plugins and Tailwind's sucrase — dev-only, not shipped to production. These will resolve when upstream packages release updates.

Changes

  • Phase 1 — Safe fixes

    • npm audit fix — patched vite (3 CVEs), ajv (ReDoS), js-yaml (prototype pollution)
    • react / react-dom 19.0.0 → 19.2.4
    • proj4 updated to latest 2.x
    • Removed @babel/plugin-transform-optional-chaining, @babel/preset-env, @babel/preset-react, @tailwindcss/line-clamp
    • Deleted .babelrc
    • Updated browserslist database
  • Phase 2 — ESLint v9 migration

    • New flat config: eslint.config.mjs
    • Removed: eslint-config-airbnb, @babel/eslint-parser, eslint-plugin-only-warn, eslint-plugin-cypress
    • Updated: prettier 2→3, eslint-config-prettier 8→10, eslint-plugin-react-hooks 4→7
    • Updated lint scripts (removed deprecated --ext flags)
    • Fixed no-empty-pattern in RoutesLoading.jsx

Follow-up issues

Test plan

  • npm run build passes
  • npm run lint:js passes (0 errors, 150 pre-existing warnings)
  • Manual smoke test of the app in browser
  • Verify Prettier check still works: docker run --rm --volume "$PWD:/work" tmknom/prettier:latest --check src

- Fix 8 security vulnerabilities (vite, ajv, js-yaml CVEs)
- Migrate ESLint v8 to v9 with flat config (eslint.config.mjs)
- Update React 19.0.0 to 19.2.4, Prettier 2.x to 3.x
- Remove unused Babel presets/plugins and .babelrc (CRA leftovers)
- Remove unused @tailwindcss/line-clamp
- Update browserslist database
- Format src/index.css for Prettier 3 (changed font-family wrapping)
- Audit only production deps (--omit=dev) since remaining minimatch
  vulnerabilities are in dev-only transitive dependencies
Comment on lines +10 to +18
- Security and dependency updates
- Fix 8 security vulnerabilities (vite, ajv, js-yaml CVEs)
- Update React 19.0.0 to 19.2.4
- Migrate ESLint v8 to v9 with flat config
- Update Prettier 2.x to 3.x
- Remove unused Babel presets (CRA leftovers) and `.babelrc`
- Remove unused `@tailwindcss/line-clamp`
- Update browserslist database

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should discuss (again) how much detail we need in the changelog. This is way too detailed for my taste, but it may add value for others.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project uses Prettier to check and format the code (cf. https://github.com/itk-dev/aapodwalk?tab=readme-ov-file#check-and-apply-with-prettier). Therefore we don't need this ESlint config file (I don't understand why we have/had .eslintrc.json file).

We probably have to clean up the project.

Comment on lines -6 to -8
"@babel/plugin-transform-optional-chaining": "^7.24.8",
"@babel/preset-env": "^7.25.3",
"@babel/preset-react": "^7.24.7",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that we can safely remove this?

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