Skip to content

vulnerability in Optimist #674

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

Closed
jacob-lassen opened this issue Mar 23, 2020 · 5 comments
Closed

vulnerability in Optimist #674

jacob-lassen opened this issue Mar 23, 2020 · 5 comments

Comments

@jacob-lassen
Copy link

Optimist inherits a vulnerability from a older version of minimist. This causes npm audit to fail. Because optimist is no longer being maintained i think the best solution would be to use minimist directly.

Solution
Use minimist directly and bypass the need for optimist

@ibrod83
Copy link

ibrod83 commented Mar 27, 2020

Is this something to be afraid of, if db-migrate is used only in as a dev dependency?

@jacob-lassen
Copy link
Author

Depends how the code is packaged for deployment. We build a code package that is then pushed to production. db-migrate is then ran as part of the start up script for the application. This will only work when it's installed as a production dependency.
Currently i have added the --audit-level=moderate flag npm audit.

@BorntraegerMarc
Copy link
Contributor

Furthermore optimist is deprecated: https://github.com/substack/node-optimist#deprecation-notice

We should update this library to use one of the recommended other packages...

@wzrdtales
Copy link
Member

agreeing, I thought about replacing it anyways already. so either an alternative like in this effort here #675 or replace it with commander

@aorinevo
Copy link

aorinevo commented Apr 6, 2020

For reference, there is an open PR for replacing optimist with yargs (see #679).

A similar approach was used to resolve vulnerabilities in Handlebars (see handlebars-lang/handlebars.js#1666).

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

No branches or pull requests

5 participants