Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-10-30 17:56:36 +01:00
65 changed files with 14172 additions and 5507 deletions

View File

@@ -0,0 +1,7 @@
open("filepath") # $getAPathArgument="filepath"
open(file="filepath") # $getAPathArgument="filepath"
o = open
o("filepath") # f-:$getAPathArgument="filepath"
o(file="filepath") # f-:$getAPathArgument="filepath"

View File

@@ -0,0 +1,19 @@
import os.path
path = "un\\normalized/path"
p1 = os.path.normpath(path) # $pathNormalization
p2 = os.path.normpath(path=path) # $pathNormalization
np = os.path.normpath
p3 = np(path) # $pathNormalization
p4 = np(path=path) # $pathNormalization
def normalize(path):
return os.path.normpath(path) # $pathNormalization
p5 = normalize(path)
p6 = normalize(path=path)

View File

@@ -0,0 +1,8 @@
s = "taintedString"
if s.startswith("tainted"): # $checks=s $branch=true
pass
sw = s.startswith # $f-:checks=s $f-:branch=true
if sw("safe"):
pass