Good rundown. One thing I'd add: when the vulnerable package is three levels deep and the direct dependency hasn't shipped a patch yet, npm overrides (or pnpm overrides) lets you force the fixed transitive version without waiting on upstream. Saved me more than once. And enforcing npm ci instead of npm install in CI/deploy so the lockfile you audited is the one that actually ships — that one bites people quietly. For the transitive cases with no patch yet, do you pin-and-wait or swap the package out?
the npm ci is really a good point, i'll update the blog. but for the overrides i have some mixed feeling for it, i did face some weird ui bugs while i was using the MUI and emotion packages. it might be a skill issue from before, but it does breaks a lot of things if there are multiple packages are using a common one, but with different version as dependencies.
and if there is a similar case vulnerable package, i just pin and wait only if it's a low severity. or i'll have to swap out the package.
Rishabh Mishra
Cloud FullStack Developer & Design Engineer.
Good rundown. One thing I'd add: when the vulnerable package is three levels deep and the direct dependency hasn't shipped a patch yet,
npm overrides(or pnpm overrides) lets you force the fixed transitive version without waiting on upstream. Saved me more than once. And enforcingnpm ciinstead ofnpm installin CI/deploy so the lockfile you audited is the one that actually ships — that one bites people quietly. For the transitive cases with no patch yet, do you pin-and-wait or swap the package out?