Skip to content

Update make-dir to resolve vulnerable dependency #3806

Open
@bloep

Description

@bloep

the less.js dependency make-dir is not up-to-date and causes security warning due to its outdated dependency.
see GHSA-c2qf-rxjj-qqgw

$ npm ls semver  
less@4.1.3 project
└─┬ make-dir@2.1.0
       └── semver@5.7.1

I would suggest updating to a current make-dir version here.
A quick search showed that it is only used here, so from my point of view an update should bring little problems.

if (mkdirp === undefined) {
try {
mkdirp = require('make-dir');
} catch (e) {
mkdirp = null;
}
}
cmd = mkdirp && mkdirp.sync || fs.mkdirSync;
cmd(dir);

Activity

stefandobre

stefandobre commented on Jul 6, 2023

@stefandobre

It appears an outdated version of semver is also referenced as a dev dependency here:

"semver": "^6.3.0",

stefandobre

stefandobre commented on Aug 1, 2023

@stefandobre

@iChenLei, is there any update on this? If not, would a pull request be welcome?

Den-dp

Den-dp commented on Aug 2, 2023

@Den-dp

it was fixed on make-dir side, run npm audit fix or try to reinstall less

jorenbroekema

jorenbroekema commented on Dec 7, 2023

@jorenbroekema

it was fixed on make-dir side, run npm audit fix or try to reinstall less

That will only fix it if you use --force because the vulnerability fix has not been done in v2 of make-dir, but rather in the next major(s).

This means it would be best if less can upgrade make-dir to the latest major version.

Dunno if this repo is still maintained but I'd be open to creating a pull request.

iChenLei

iChenLei commented on Dec 7, 2023

@iChenLei
Member

@jorenbroekema PR welcome

jorenbroekema

jorenbroekema commented on Dec 7, 2023

@jorenbroekema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @matthew-dean@Den-dp@iChenLei@stefandobre@bloep

    Issue actions

      Update `make-dir` to resolve vulnerable dependency · Issue #3806 · less/less.js