File tree 1 file changed +10
-2
lines changed
dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,16 @@ private Process launchBundleAudit(File folder) throws AnalysisException {
114
114
throw new AnalysisException (String .format ("%s should have been a directory." , folder .getAbsolutePath ()));
115
115
}
116
116
final List <String > args = new ArrayList <String >();
117
- final String bundleAuditPath = Settings .getString (Settings .KEYS .ANALYZER_BUNDLE_AUDIT_PATH );
118
- args .add (null == bundleAuditPath ? "bundle-audit" : bundleAuditPath );
117
+ String bundleAuditPath = Settings .getString (Settings .KEYS .ANALYZER_BUNDLE_AUDIT_PATH );
118
+ File bundleAudit = null ;
119
+ if (bundleAuditPath != null ) {
120
+ bundleAudit = new File (bundleAuditPath );
121
+ if (!bundleAudit .isFile ()) {
122
+ LOGGER .warn ("Supplied `bundleAudit` path is incorrect: " + bundleAuditPath );
123
+ bundleAudit = null ;
124
+ }
125
+ }
126
+ args .add (bundleAudit != null && bundleAudit .isFile () ? bundleAudit .getAbsolutePath () : "bundle-audit" );
119
127
args .add ("check" );
120
128
args .add ("--verbose" );
121
129
final ProcessBuilder builder = new ProcessBuilder (args );
You can’t perform that action at this time.
0 commit comments