mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Model replace and putIfAbsent
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
| TaintedEnvironment.java:28:35:28:55 | new String[] | Command with a relative path 'ls' is executed. |
|
||||
| TaintedEnvironment.java:39:35:39:55 | new String[] | Command with a relative path 'ls' is executed. |
|
||||
| Test.java:50:46:50:49 | "ls" | Command with a relative path 'ls' is executed. |
|
||||
|
||||
@@ -15,6 +15,17 @@ public class TaintedEnvironment {
|
||||
|
||||
pb.environment().put(s, "foo"); // $hasTaintFlow
|
||||
|
||||
Map<String, String> extra = Map.of("USER", s);
|
||||
|
||||
pb.environment().putAll(extra); // $hasTaintFlow
|
||||
|
||||
pb.environment().putIfAbsent("foo", s); // $hasTaintFlow
|
||||
pb.environment().putIfAbsent(s, "foo"); // $hasTaintFlow
|
||||
|
||||
pb.environment().replace("foo", s); // $hasTaintFlow
|
||||
pb.environment().replace(s, "foo"); // $hasTaintFlow
|
||||
pb.environment().replace("foo", "bar", s); // $hasTaintFlow
|
||||
|
||||
Map<String, String> env = pb.environment();
|
||||
|
||||
env.put("foo", s); // $hasTaintFlow
|
||||
|
||||
Reference in New Issue
Block a user