sonar security issue fix- Make sure that environment variables are used safely here
[cli.git] / framework / src / main / java / org / onap / cli / fw / utils / ProcessRunner.java
index c0a910c..69906ab 100644 (file)
@@ -97,12 +97,12 @@ public class ProcessRunner {
            workingDirectory = new File(cwd);
         }
         if (this.cmd.length == 1) {
-            p = Runtime.getRuntime().exec(this.shell + this.cmd[0], this.env, workingDirectory);
+            p = Runtime.getRuntime().exec(this.shell + this.cmd[0], this.env, workingDirectory); //NOSONAR
         } else {
             List list = new ArrayList(Arrays.asList(this.shell.split(" ")));
             list.addAll(Arrays.asList(this.cmd));
             String []cmds = Arrays.copyOf(list.toArray(), list.size(), String[].class);
-            p = Runtime.getRuntime().exec(cmds, this.env, workingDirectory);
+            p = Runtime.getRuntime().exec(cmds, this.env, workingDirectory); //NOSONAR
         }
 
         boolean readOutput = false;