foreversd / forever-monitor

The core monitoring functionality of forever without the CLI
MIT License
1.16k stars 178 forks source link

a 3.0.4 release for forever-monitor with updated chokidar #200

Open evansrobert opened 3 years ago

evansrobert commented 3 years ago

Hi, @kibertoad,

Issue Description

I noticed that a vulnerability is introduced in forever-monitor@3.0.3: Vulnerability CVE-2020-28469 affects package glob-parent (versions:<5.1.2): https://snyk.io/vuln/SNYK-JS-GLOBPARENT-1016905 The above vulnerable package is referenced by forever-monitor@3.0.3 via: forever-monitor@3.0.3 ➔ chokidar@2.1.8 ➔ glob-parent@3.1.0

Since forever-monitor@3.0.3 (138,256 downloads per week) is referenced by 25 downstream projects (e.g., forever 4.0.1 (latest version), domotz-remote-pawn 3.9.0-b001 (latest version), alks 3.5.0 (latest version), gulp-forever-monitor 1.0.9 (latest version), edgemicro 3.2.2 (latest version)), the vulnerability CVE-2020-28469 can be propagated into these downstream projects and expose security threats to them via the following package dependency paths: (1)domotz-remote-pawn@3.8.0-b001 ➔ forever@4.0.1 ➔ forever-monitor@3.0.3 ➔ chokidar@2.1.8 ➔ glob-parent@3.1.0 (2)edgemicro@3.2.2 ➔ forever-monitor@3.0.3 ➔ chokidar@2.1.8 ➔ glob-parent@3.1.0 ......

If forever-monitor@3.0.* removes the vulnerable package from the above version, then its fixed version can help downstream users decrease their pain.

Given the large number of downstream users, could you help update your package to remove the vulnerability from forever-monitor@3.0.3 ?

Fixing suggestions

In forever-monitor@3.0.4, maybe you can kindly try to perform the following upgrade : chokidar ^2.1.8 ➔ ^3.0.0;

Note: chokidar@3.0.0(>=3.0.0) directly depends on glob-parent@5.1.2 which has fixed the vulnerability CVE-2020-28469.

Thank you for your attention to this issue and welcome to share other ways to resolve the issue.^_^

redoxerjosh commented 3 years ago

@kibertoad @indexzero

First and foremost, thank you kindly for the work and maintenance of forever-monitor!

We are working through updates of our system and have a need to address security vulnerabilities with tar which come in by way of forever-monitor's dependency on an older version of Chokidar. It looks like the latest Chokidar (3.5.2) would address the issue described by evansrobert as well as the issue for tar.

Was hoping I could help boost some awareness for bumping forever-monitor forward to Chokidar 3. The CVE's that we're looking at are CVE-2021-32804, CVE-2021-32803, CVE-2021-37701, CVE-2021-37712, and CVE-2021-37713

The PR https://github.com/foreversd/forever-monitor/pull/198 looks like it could be a good basis for maintaining backwards compatibility with Node < 8 while supporting Chokidar 3 on modern versions of Node.. with a minor version bump on this PR (to Chokidar 3.5.2) maybe it could address all of the CVE's showing up?

I'd be happy to help in some way if a new PR is needed.

gael-donat commented 2 years ago

Any news about this ?

pwcushman commented 2 years ago

Is there a version 3.0.4?