From 71ffdcf96f0ba9b49a229730b42dcf6a00b62b47 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Wed, 18 Jan 2023 05:43:32 -0500 Subject: [PATCH] fix: npe resolves #5318 --- .../org/owasp/dependencycheck/analyzer/NodePackageAnalyzer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/owasp/dependencycheck/analyzer/NodePackageAnalyzer.java b/core/src/main/java/org/owasp/dependencycheck/analyzer/NodePackageAnalyzer.java index 12875f915c0..28976bd142e 100644 --- a/core/src/main/java/org/owasp/dependencycheck/analyzer/NodePackageAnalyzer.java +++ b/core/src/main/java/org/owasp/dependencycheck/analyzer/NodePackageAnalyzer.java @@ -394,7 +394,7 @@ private void processDependencies(JsonObject json, File baseDir, File rootFile, continue; } - version = jo.getString("version"); + version = jo.getString("version", ""); optional = jo.getBoolean("optional", false); isDev = jo.getBoolean("dev", false); } else {