mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Merge branch 'main' of github.com:github/codeql into RasmusWL-python-port-reflected-xss
This commit is contained in:
@@ -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"
|
||||
@@ -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)
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user