mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
import builtins
|
|
import io
|
|
|
|
open("filepath") # $ getAPathArgument="filepath"
|
|
open(file="filepath") # $ getAPathArgument="filepath"
|
|
|
|
o = open
|
|
|
|
o("filepath") # $ getAPathArgument="filepath"
|
|
o(file="filepath") # $ getAPathArgument="filepath"
|
|
|
|
|
|
builtins.open("filepath") # $ getAPathArgument="filepath"
|
|
builtins.open(file="filepath") # $ getAPathArgument="filepath"
|
|
|
|
|
|
io.open("filepath") # $ getAPathArgument="filepath"
|
|
io.open(file="filepath") # $ getAPathArgument="filepath"
|
|
|
|
f = open("path") # $ getAPathArgument="path"
|
|
f.write("foo") # $ getAPathArgument="path" fileWriteData="foo"
|
|
lines = ["foo"]
|
|
f.writelines(lines) # $ getAPathArgument="path" fileWriteData=lines
|
|
|
|
|
|
def through_function(open_file):
|
|
open_file.write("foo") # $ fileWriteData="foo" getAPathArgument="path"
|
|
|
|
through_function(f)
|
|
|
|
from os import path
|
|
path.exists("filepath") # $ MISSING: getAPathArgument="filepath"
|
|
path.isfile("filepath") # $ MISSING: getAPathArgument="filepath"
|
|
path.isdir("filepath") # $ MISSING: getAPathArgument="filepath"
|
|
path.islink("filepath") # $ MISSING: getAPathArgument="filepath"
|
|
path.ismount("filepath") # $ MISSING: getAPathArgument="filepath"
|