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 {
1818
1919private module ProcessBuilderEnvironmentFlow = DataFlow:: Global< ProcessBuilderEnvironmentConfig > ;
2020
21+ /**
22+ * A taint-tracking configuration that tracks flow from unvalidated data to an environment variable for a subprocess.
23+ */
2124module ExecTaintedEnvironmentConfig implements DataFlow:: ConfigSig {
2225 predicate isSource ( DataFlow:: Node source ) { source instanceof ThreatModelFlowSource }
2326
2427 predicate isSink ( DataFlow:: Node sink ) {
2528 sinkNode ( sink , "environment-injection" )
2629 or
30+ // sink is an added to a `ProcessBuilder::environment` map.
2731 exists ( MapPutCall mpc | mpc .getAnArgument ( ) = sink .asExpr ( ) |
2832 ProcessBuilderEnvironmentFlow:: flowToExpr ( mpc .getQualifier ( ) )
2933 )
3034 }
3135}
3236
37+ /**
38+ * Taint-tracking flow for unvalidated data to an environment variable for a subprocess.
39+ */
3340module ExecTaintedEnvironmentFlow = TaintTracking:: Global< ExecTaintedEnvironmentConfig > ;
You can’t perform that action at this time.
0 commit comments