jeemok / better-npm-audit

The goal of this project is to provide additional features on top of the existing npm audit options
https://www.npmjs.com/package/better-npm-audit
MIT License
118 stars 26 forks source link

add module-ignore flag #71

Closed ghost closed 2 years ago

ghost commented 2 years ago

Description To address feature request: https://github.com/jeemok/better-npm-audit/issues/69

This fixes the issue where vulnerabilities disputed by package owners causes ever changing vulnerability ids in the audit report. In my repo I have to a seemingly infinite number of ids to my .nsprc to manage the currently disputed lodash issue:

Screen Shot 2022-02-20 at 5 43 33 PM

Having a single flag to ignore lodash rather than w/e next id pops up for the same vulnerability is a huge time saver in a team environment :).

TODO

Screenshots Tested via npm link No flags, remove nsprc code for lodash (1 module):

no-flags

-m flag 1 module:

m-flag

--module-ignore flag 1 module:

module-ignore-flag

--module-ignore flag 2 modules (removed lodash and hermes-engine ids from nsprc):

2 modules

@jeemok @GrzesiekP @IPWright83

bestfoodalex commented 2 years ago

+1 on this update. Would help us tremendously. Thanks @alexburkowskypolysign

jeemok commented 2 years ago

this is a great feature, thank you for contributing @alexburkowskypolysign !

ghost commented 2 years ago

You are very welcome @jeemok! Thanks for merging

Sujay-shetty commented 2 years ago

will it support if we include in .nsprc file as well ?

jeemok commented 2 years ago

@Sujay-shetty not currently, but definitely sounds like a good feature. Can you help to create a new issue and we can track it from there?