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

Issue 41: Fix issues with large audit data response #42

Closed InfoSec812 closed 4 years ago

InfoSec812 commented 4 years ago

Resolves #41

Description

For some projects, the data returned from npm audit --json can be quite significant in size. This change refactors the code to use command.spawn and a stream of data events, instead of command.exec and a fixed sized buffer. Allowing the stderr/stdout data to stream via events ensures that the application can handle much larger data structures.