Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Npm lockfiles can be a security blindspot for injecting malicious modules #2581

Open
jeffin143 opened this issue Oct 31, 2019 · 5 comments
Open
Labels
discussion This issue is being discussed, and is not ready for implementation security

Comments

@jeffin143
Copy link
Member

jeffin143 commented Oct 31, 2019

User story

I am not sure, I am the correct person to discuss about the npm build issue, but I cam across an article - https://snyk.io/blog/why-npm-lockfiles-can-be-a-security-blindspot-for-injecting-malicious-modules/

which states linting package-lock.json files is a good practice to avoid security issues.

Best solution for this problem

Should we lint package-lock.json file ?

Also does npm audit help us ?

MVP

Check - https://github.com/lirantal/lockfile-lint

@jeffin143 jeffin143 added the discussion This issue is being discussed, and is not ready for implementation label Oct 31, 2019
@znarf
Copy link
Member

znarf commented Nov 1, 2019

@jeffin143 happy to add that to our 'lint' jobs on CI, doable?

@jeffin143
Copy link
Member Author

@znarf Umm I will try it in on one of my own repo, if everything works smooth, I will add the config files here :)

@Betree
Copy link
Member

Betree commented Nov 12, 2019

Thanks for reporting this, it's really interesting.

I don't think that lockfile-lint solves the problem in a nice way because it's very easy to host malicious code on NPM or Github. But maybe that can be a good first step.

@jeffin143
Copy link
Member Author

@znarf @Betree Revisiting this :
Found some alternative which some of our collective have

NPM audit -

https://dev.azure.com/webpack/webpack-dev-server/_build/results?buildId=7132
webpack/webpack-dev-server#2303

Synk
https://snyk.io/docs/using-snyk/
webpack/webpack-cli#1122

Both of these have been used across many repos, so may be that could be helpful

@Betree
Copy link
Member

Betree commented Nov 25, 2019

@jeffin143 I don't see how these two PRs are related to this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue is being discussed, and is not ready for implementation security
Projects
None yet
Development

No branches or pull requests

3 participants