25 lines
591 B
Plaintext
25 lines
591 B
Plaintext
include::../description.adoc[]
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
== Sensitive Code Example
|
|
|
|
----
|
|
public class Main {
|
|
public static void main (String[] args) {
|
|
System.getenv(); // Sensitive
|
|
System.getenv("myvar"); // Sensitive
|
|
|
|
ProcessBuilder processBuilder = new ProcessBuilder();
|
|
Map<String, String> environment = processBuilder.environment(); // Sensitive
|
|
environment.put("VAR", "value");
|
|
|
|
Runtime.getRuntime().exec("ping", new String[]{"env=val"}); // Sensitive
|
|
}
|
|
}
|
|
----
|
|
|
|
include::../see.adoc[]
|