Skip to content

Commit

Permalink
Fixes #443 for v5
Browse files Browse the repository at this point in the history
  • Loading branch information
eoftedal committed Jul 15, 2024
1 parent 632165f commit 1dc849a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [5.1.2]

### Bugfix

- JSON format should not include results without vulnerabilities unless `--verbose` is specified.

## [5.1.1]

### Bugfix
Expand Down
2 changes: 1 addition & 1 deletion node/lib/retire.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

var exports = exports || {};
exports.version = '5.1.1';
exports.version = '5.1.2';

function isDefined(o) {
return typeof o !== 'undefined';
Expand Down
4 changes: 2 additions & 2 deletions node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Erlend Oftedal <[email protected]>",
"name": "retire",
"description": "Retire is a tool for detecting use of vulnerable libraries",
"version": "5.1.1",
"version": "5.1.2",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions node/src/reporters/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export default {
};
logger.warn = logger.error = (message) => finalResults.errors.push(message);
logger.logVulnerableDependency = (finding) => {
if (!config.verbose) {
finding.results = finding.results.filter((r) => retire.isVulnerable([r]));
}
finalResults.data.push(finding);
};
logger.logDependency = function (finding) {
Expand Down

0 comments on commit 1dc849a

Please sign in to comment.