InfoSec812 / npm-audit-ci-wrapper

A wrapper for 'npm audit' which can be configurable for use in a CI/CD tool like Jenkins
Apache License 2.0
13 stars 11 forks source link

improvement: report output readability #40

Closed shockey closed 5 years ago

shockey commented 5 years ago

This PR introduces a table report format, and makes the report messaging more helpful by repeating back the selected options to the user.

Context

I'm integrating npm-audit-ci-wrapper in Swagger UI.

This is the only module with the right combination of options for our purposes, but I found that vulnerability readouts were overflowing my (relatively-narrow) terminal window, and the static message coming back from the utility wasn't helpful in differentiating between the two runs we want to do for our audits.

Before

image

After

image

shockey commented 5 years ago

FWIW, it might also be worthwhile to discuss copying npm's table style:

image

...or at least including equivalent information -- I find the dependency path trace to be helpful.

shockey commented 5 years ago

@InfoSec812 bump!

InfoSec812 commented 5 years ago

@InfoSec812 bump!

Sorry, I haven't had a chance to test it out and confirm. I will try to do that this morning.

InfoSec812 commented 5 years ago

I tested it on a few projects and I am OK with this. One of the main concerns I has was to ensure it didn't break the JSON output option so that it could be piped to npm-audit-html and that still works. APPROVED!

InfoSec812 commented 5 years ago

@shockey One last thing... Please bump the version in package.json and then I will merge.