OS Command Injection (ARCH8102)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key kotlin.security.os-command-injection · Severity error · Category security · CWE CWE-78
Flags Runtime.exec / ProcessBuilder invoked with a command built from string templates or concatenation.
Incorrect
Section titled “Incorrect”Runtime.getRuntime().exec("ls $dir")Correct
Section titled “Correct”ProcessBuilder("ls", dir).start()Pass the program and each argument separately; never build a shell string from input.