UKHomeOfficeForms / hof

Bootstrap a HOF project
MIT License
15 stars 17 forks source link

npm audit shows a critical vulnerability in a dependency #169

Open zuzak opened 4 years ago

zuzak commented 4 years ago

Running npm audit shows a few vulnerable dependencies. Three of these dependencies are breaking changes, and seem to break the test suite if you install them.

As they are major version bumps, npm audit fix is unable to apply them. Downstream projects that consume hof are unable to resolve their npm audit reports unless these three packages are updated in hof directly.

Some are fairly easy to resolve: it looks like command line arguments need tweaking for mocha; but others are harder: updating helmet causes some tests to fail.

Click to show `npm audit` output ``` $ npm audit === npm audit security report === # Run npm install --save-dev mocha@7.1.0 to resolve 3 vulnerabilities SEMVER WARNING: Recommended action is a potentially breaking change ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Regular Expression Denial of Service │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ minimatch │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ mocha [dev] │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ mocha > glob > minimatch │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/118 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Critical │ Command Injection │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ growl │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ mocha [dev] │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ mocha > growl │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/146 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Regular Expression Denial of Service │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ mocha [dev] │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ mocha > debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/534 │ └───────────────┴──────────────────────────────────────────────────────────────┘ # Run npm install helmet@3.21.3 to resolve 3 vulnerabilities SEMVER WARNING: Recommended action is a potentially breaking change ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Regular Expression Denial of Service │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ helmet │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ helmet > connect > debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/534 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Regular Expression Denial of Service │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ helmet │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ helmet > connect > finalhandler > debug │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/534 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Moderate │ Configuration Override │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ helmet-csp │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ helmet │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ helmet > helmet-csp │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1176 │ └───────────────┴──────────────────────────────────────────────────────────────┘ # Run npm install i18n-future@2.0.0 to resolve 3 vulnerabilities SEMVER WARNING: Recommended action is a potentially breaking change ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ Low │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ i18n-future │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ i18n-future > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/577 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ i18n-future │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ i18n-future > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/782 │ └───────────────┴──────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Prototype Pollution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ i18n-future │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ i18n-future > lodash │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1065 │ └───────────────┴──────────────────────────────────────────────────────────────┘ found 9 vulnerabilities (4 low, 1 moderate, 3 high, 1 critical) in 2477 scanned packages 9 vulnerabilities require semver-major dependency updates.```