I recently discovered the npm audit
feature and ran the command to find vulnerabilities in a project I'm working on. Came across a bunch of them (over 100).
npm
suggests that running npm audit fix
will fix all vulnerabilities except those which have breaking changes. I didn't encounter any such vulnerability in my code and now it shows 0 vulnerabilities.
My question is that when I push the code to github will these vulnerabilities be fixed already for someone who clones/forks this repo?
For context, node_modules
are ignored in my .gitignore
file (Which means they are not pushed to github along with the code). Since node_modules
is where these "vulnerability fixes" are applied, do they persist for everyone who then forks/clones this repo?
If so, how? Does it have something to do with package-lock.json
?
If not, is there a way to make these changes persistent?