mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Python: tests to show modeling is very syntactical
This commit is contained in:
@@ -111,6 +111,19 @@ if UNKNOWN:
|
||||
|
||||
os.spawnl(os.P_WAIT, "/bin/sh", "<progname>", "-c", "vuln") # $SystemCommandExecution_getCommand="/bin/sh" $f-:SystemCommandExecution_getCommand="vuln"
|
||||
|
||||
|
||||
########################################
|
||||
# Passing arguments by reference
|
||||
|
||||
args = ["/bin/sh", "-c", "vuln"]
|
||||
subprocess.Popen(args) # $SystemCommandExecution_getCommand=args
|
||||
|
||||
args = "<progname>"
|
||||
use_shell = False
|
||||
exe = "executable"
|
||||
subprocess.Popen(args, shell=use_shell, executable=exe) # $f+:SystemCommandExecution_getCommand=args $SystemCommandExecution_getCommand=exe
|
||||
|
||||
|
||||
################################################################################
|
||||
# Taint related
|
||||
|
||||
|
||||
Reference in New Issue
Block a user