mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Add BAD markers to samples
This commit is contained in:
@@ -3,7 +3,8 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
||||
String value = request.getParameter("value");
|
||||
|
||||
Map<String, String> env = processBuilder.environment();
|
||||
env.put(attribute, value);
|
||||
// BAD: attr and value are tainted and being added to the environment
|
||||
env.put(attr, value);
|
||||
|
||||
processBuilder.start();
|
||||
}
|
||||
@@ -2,6 +2,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
||||
String path = request.getParameter("path");
|
||||
|
||||
Map<String, String> env = processBuilder.environment();
|
||||
// BAD: path is tainted and being added to the environment
|
||||
env.put("PATH", path);
|
||||
|
||||
processBuilder.start();
|
||||
|
||||
Reference in New Issue
Block a user