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

JSON output incompatible with npm audit --json output #32

Closed jacobcsmith closed 5 years ago

jacobcsmith commented 5 years ago

First off thank you for creating this package. It looks to be useful with integrating npm audit with my CI setup.

I encountered an error when trying to incorporate the output of npm-audit-ci-wrapper with npm-audit-html as recommended in your code.

Error: marked(): input parameter is undefined or null was the error. I traced it to a difference in the JSON output of this package as compared to running npm audit --json. Specifically the "advisories" element. When I run npm-audit-ci-wrapper --json, the "advisories" element is an array whereas it is an object when I run npm audit --json.

InfoSec812 commented 5 years ago

@jacobcsmith Thank for bringing this to my attention. I'm pretty swamped for the next 3 weeks, but if you would like to submit a PR I might have time to review and approve sooner.