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

Upgrade vulnerable dependencies #7486

Closed
3 tasks done
medikoo opened this issue Mar 19, 2020 · 14 comments
Closed
3 tasks done

Upgrade vulnerable dependencies #7486

medikoo opened this issue Mar 19, 2020 · 14 comments

Comments

@medikoo
Copy link
Contributor

medikoo commented Mar 19, 2020

We need to upgrade following dependencies.

Ideally each upgrade should be addressed with different PR.

PR's should be based against v2 branch

@exoego
Copy link
Contributor

exoego commented May 12, 2020

We may remove mkdirp dependency, since Node.js 10.12.0 added recursive option to fs.mkdir.

https://nodejs.org/api/fs.html#fs_fs_mkdir_path_options_callback

@exoego
Copy link
Contributor

exoego commented May 12, 2020

How about removing update-notifier on serverless v2?
IMHO, update notification is less valuable nowadays,
because there are many ways to update dependencies automatically, e.g. dependabot, greenkeeper and so on.

One example of npm module that removed update-notifier.
palantir/tslint#2262

@medikoo
Copy link
Contributor Author

medikoo commented May 12, 2020

@exoego thanks for suggestion. Still it doesn't apply that much in serverless case as it's top level package (not typical dependency)

Many developers use just global (or standalone) installation and naturally in such case they're not tracking new updates via some external means

@exoego
Copy link
Contributor

exoego commented May 12, 2020

Ah, thats true.
I forgot about global installation.

@instantlinux
Copy link

I have an enterprise installation of this for which dot-prop and update-notifier really need to be cleared of high-severity vulnerabilities like advisory #1213.

Trott added a commit to Trott/serverless that referenced this issue Aug 8, 2020
Fixes serverless#7486

Bump update-notifier to the current version to resolve security alerts.
However, don't load in Node.js 6 because the current version is only
supported in Node.js 8 and above. The serverless package will still work
in Node.js 6, but it will not alert people when an upgrade is available.
@Trott
Copy link
Contributor

Trott commented Aug 8, 2020

I can think of a few ways around this for update-notifier (which has dot-prop as a vulnerable dependency), but I'm not sure if they'll be acceptable to the serverless maintainers or not.

Easiest option might be to bump update-notifier to the current version but don't load it if the user is running Node.js 6. On the one hand, I guess it's a little rude to not tell Node.js 6 users when they can/should update serverless. On the other hand, perhaps this is snobbish or something, but Node.js 6 went EOL almost a year-and-a-half ago as of this writing, so maybe they're not very likely to upgrade stuff anyway for whatever reason. (Yes, I'm making assumptions that if they can't/don't update Node.js, they can't/don't update serverless, and that assumption may be wrong.)

There are other options, but I'd start with that one. I'll open a PR for that and see what happens with it.

@Trott
Copy link
Contributor

Trott commented Aug 8, 2020

There are other options, but I'd start with that one. I'll open a PR for that and see what happens with it.

Well, the PR template has this:

⚠️⚠️ Do not propose PR's without prior agreement on solution in corresponding issue

So maybe I'll wait for a maintainer to comment.....

@Trott
Copy link
Contributor

Trott commented Aug 8, 2020

@medikoo
Copy link
Contributor Author

medikoo commented Aug 9, 2020

@Trott thanks for proposal.

I think the right approach is simply to drop support for Node.js v6 & v8 and release a new major, I will discuss it internally, and hopefully by end of this month we will have that sorted out.

@Trott
Copy link
Contributor

Trott commented Aug 16, 2020

Good news: dot-prop@4.2.1 has been published with the security fix. sindresorhus/dot-prop#63 (comment)

@Trott
Copy link
Contributor

Trott commented Aug 16, 2020

Good news: dot-prop@4.2.1 has been published with the security fix. sindresorhus/dot-prop#63 (comment)

Whether the automated tools that report the issue pick that fact up or not remains to be seen....

@instantlinux
Copy link

instantlinux commented Aug 17, 2020

Before jumping on dot-prop@4.2.1 hastily, please double-check the integrity of the upstream. I see that the source repo on github has not been updated (see the commit history of https://github.com/sindresorhus/dot-prop where the latest 4.x tag is 4.2.0) yet there's a new version 4.2.1 posted at npmjs. I don't know how to account for this discrepancy but for a high-popularity repo like that with ~15M downloads weekly I'd like to know why it exists. (There is an apparent/incomplete transition in maintenance of that upstream repo, see discussion in their issue sindresorhus/dot-prop#63. What's published to npmjs came from a fork rather than a merged PR.)

@Trott
Copy link
Contributor

Trott commented Aug 21, 2020

I see that the source repo on github has not been updated (see the commit history of https://github.com/sindresorhus/dot-prop where the latest 4.x tag is 4.2.0) yet there's a new version 4.2.1 posted at npmjs.

Fixed. sindresorhus/dot-prop#63 (comment)

@medikoo
Copy link
Contributor Author

medikoo commented Aug 25, 2020

I'm glad to announce that we will release v2 next week. PR that upgrades vulnerable dependencies is welcome (I've updated main description)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants