mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-09 19:45:13 +02:00
18 lines
707 B
Java
18 lines
707 B
Java
/**
|
|||
* Regression fixture: tainted receiver flowing through chained
|
|||
* zero-arg builder methods and into Runtime.exec.
|
|||
*
|
|||
* The receiver-fallback path in ssa_transfer's call handling is
|
|||
* expected to thread taint through `tainted.trim().toLowerCase()` —
|
|||
* neither method takes arguments, so the taint travels purely through
|
|||
* the receiver channel. This fixture pins that behaviour so
|
|||
* heap-aliasing changes do not regress it.
|
|||
*/
|
|||
public class Main {
|
|||
public static void main(String[] args) throws Exception {
|
|||
String tainted = System.getenv("INPUT"); // SOURCE
|
|||
String result = tainted.trim().toLowerCase();
|
|||
Runtime.getRuntime().exec(result); // SINK
|
|||
}
|
|||
}
|