File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,23 @@ private module ProcessBuilderEnvironmentConfig implements DataFlow::ConfigSig {
18
18
19
19
private module ProcessBuilderEnvironmentFlow = DataFlow:: Global< ProcessBuilderEnvironmentConfig > ;
20
20
21
+ /**
22
+ * A taint-tracking configuration that tracks flow from unvalidated data to an environment variable for a subprocess.
23
+ */
21
24
module ExecTaintedEnvironmentConfig implements DataFlow:: ConfigSig {
22
25
predicate isSource ( DataFlow:: Node source ) { source instanceof ThreatModelFlowSource }
23
26
24
27
predicate isSink ( DataFlow:: Node sink ) {
25
28
sinkNode ( sink , "environment-injection" )
26
29
or
30
+ // sink is an added to a `ProcessBuilder::environment` map.
27
31
exists ( MapPutCall mpc | mpc .getAnArgument ( ) = sink .asExpr ( ) |
28
32
ProcessBuilderEnvironmentFlow:: flowToExpr ( mpc .getQualifier ( ) )
29
33
)
30
34
}
31
35
}
32
36
37
+ /**
38
+ * Taint-tracking flow for unvalidated data to an environment variable for a subprocess.
39
+ */
33
40
module ExecTaintedEnvironmentFlow = TaintTracking:: Global< ExecTaintedEnvironmentConfig > ;
You can’t perform that action at this time.
0 commit comments