-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Add snyk for npm package security #841
Conversation
/cc @nodejs/website Can we merge this one? Yay? Nay? |
I'm still -0. |
What about nsp? |
@Starefossen I believe the conversation here is primarily about fixing the issues, which - for these vulnerabilities - is only doable by using Snyk's patches. There are various other reasons to use Snyk over nsp for testing purposes (clearly I'm biased...), but either way nsp wouldn't help with the remediation discussed here. |
i'd say merge it now to avoid security loopholes and contemplate on it later on. LGTM |
Did we ever try to see if we were actually affected by the minimatch vulnerability? |
Please correct me if I'm wrong but given
I doubt we were vulnerable as I can't see how a malicious input could be provided to minimatch once the site was built. The site is static and once built is served via nginx. |
@guypod is running the wizard the only way to update the policy file? |
Will snyk block/patch vulnerabilities automatically during runtine, or will we have to update the policy file and then redeploy?
|
@lpinca the wizard is the only tool that automatically edits it, but you can manually edit it too. Format is probably self explanatory but happy to answer questions about it. You can also run |
@Starefossen to patch, Snyk adds the By the time More details on our docs: https://snyk.io/docs/using-snyk/#protect |
@Starefossen I realized I didn't explicitly answer your question: the short answer is you need to update the .snyk file, ensure you run |
This means updating the whole dependency tree and the policy file before each commit for us. Also I guess the policy file is based on the dependency tree so the npm version used for development must match with the npm version used on the remote server during the deployment phase. |
@lpinca I might be missing something here... the .snyk file specifies a dependency path, and will only patch that. You can choose to include a more loose path (e.g. The patching happens each time you run In other words, there shouldn't be any need for you to refresh your deploys any more than you did before. You just need to ensure |
@guypod I may be the one missing something here 😄 but I'll try to clarify my thoughts.
|
You're right that the solution is a moving target. Which is the reason we created Snyk :) My advice would be to "Watch" this project with Snyk (free for open source), and you'll get pull requests both on fixes to new vulns and (still a bit of a WIP) when a better remediation is made available. Maybe try that out? |
@lpinca regarding the specific scenarios:
Makes sense? |
@guypod yes it does but AFAIK we can't grant access to the Synk application. See #821 (comment). As I see it, right now a lot of effort is necessary to keep the |
I second that @lpinca. Imho it looks like the work of maintaining an effective snyk configuration is greater than the received benefit. |
@lpinca @phillipj can I ask what are the reason you don't want to integrate Snyk to the org? I understand you removed Greenkeeper, but Snyk is quite different, notably sending far fewer PRs (only vuln related ones) and has controls stating what you do and don't want reported on. Happy to do a quick hangout to talk through it if it's a bit much for GitHub comment conversation |
@guypod it's a nodejs org security policy to not add 3rd party github applications which requests private access. All the gh apps we have been wanting to add so far, has been asking for private access. It would be okey for us if we could setup a webhook against snyk manually for this repo alone, instead of org wide permissions. Would that be a possibility? P.S. we didn't turn off greenkeeper cause we wanted to, it required org wide permissions which we couldn't grant it. |
@phillipj understood. What others have done to achieve this is to:
Snyk will then use only this user's token, and so will not have access to the private repos. Would this work here? |
This is a cleaned up version of #821. Please check the discussion over there.
/cc @nodejs/build