Skip to content

Commit

Permalink
Introduced protections against system command injection
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeebot[bot] authored May 4, 2024
1 parent 550b7c9 commit f010507
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

package org.elasticsearch.gradle.reaper;

import io.github.pixee.security.SystemCommand;
import java.io.Closeable;
import java.io.IOException;
import java.io.UncheckedIOException;
Expand Down Expand Up @@ -68,7 +69,7 @@ private void reap() {
String line = Files.readString(inputFile);
System.out.println("Running command: " + line);
String[] command = line.split(" ");
Process process = Runtime.getRuntime().exec(command);
Process process = SystemCommand.runCommand(Runtime.getRuntime(), command);
int ret = process.waitFor();

System.out.print("Stdout: ");
Expand Down

0 comments on commit f010507

Please sign in to comment.