RetireJS / retire.js

scanner detecting the use of JavaScript libraries with known vulnerabilities. Can also generate an SBOM of the libraries it finds.
https://retirejs.github.io/retire.js/
Other
3.66k stars 414 forks source link

Valid path/Text output format fails with "Error: EBADF: bad file descriptor, close" #321

Closed AFranc1sc0 closed 4 years ago

AFranc1sc0 commented 4 years ago

Summary

retire --outputformat text --outputpath ./retire_results.txt

Results in exception though in previous iterations of JS Retire this invocation functioned without issue.

Retire.js version: (retire --version): 2.1.2 node version: (node --version): v13.12.0 Type: Bug

Description: text output format fails with exception:

retire --outputformat text --outputpath ./retire_results.txt --exitwith 0 Exception caught: [Arguments] { '0': [Error: EBADF: bad file descriptor, close] { errno: -9, code: 'EBADF', syscall: 'close' }, '1': 'uncaughtException' } Error: EBADF: bad file descriptor, close ERROR: Job failed: exit code 1

Expected behavior:

Retire should execute without exception; a text file should be generated within the directory of execution containing the results of the JS Retire scan.

AFranc1sc0 commented 4 years ago

Also thank you for any help on this matter and excellent tool!

AFranc1sc0 commented 4 years ago

It works! Thank you for the fix!