mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #14406 from amammad/amammad-python-FileSystemAccess
Python: New FileSystem Access
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,4 @@
|
||||
from aiofile import async_open, AIOFile
|
||||
|
||||
AIOFile("file", 'r') # $ getAPathArgument="file"
|
||||
async_open("file", "r") # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,3 @@
|
||||
import aiofiles
|
||||
|
||||
aiofiles.open("file", mode='r') # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,8 @@
|
||||
import anyio
|
||||
from anyio.streams.file import FileReadStream, FileWriteStream
|
||||
from anyio import Path
|
||||
|
||||
anyio.open_file("file", 'r') # $ getAPathArgument="file"
|
||||
FileReadStream.from_path("file") # $ getAPathArgument="file"
|
||||
FileWriteStream.from_path("file") # $ getAPathArgument="file"
|
||||
Path("file") # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,3 @@
|
||||
from baize.asgi import FileResponse as baizeFileResponse
|
||||
|
||||
baizeFileResponse("file") # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,8 @@
|
||||
import cherrypy
|
||||
from cherrypy.lib.static import serve_file, serve_download, staticfile
|
||||
|
||||
serve_file("file") # $ getAPathArgument="file"
|
||||
serve_download("file") # $ getAPathArgument="file"
|
||||
staticfile("file") # $ getAPathArgument="file"
|
||||
# root won't make this safe
|
||||
staticfile("file", root="/path/to/safe/dir") # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,4 @@
|
||||
from sanic import response
|
||||
|
||||
response.file("file") # $ getAPathArgument="file"
|
||||
response.file_stream("file") # $ getAPathArgument="file"
|
||||
@@ -0,0 +1,2 @@
|
||||
testFailures
|
||||
failures
|
||||
@@ -0,0 +1,2 @@
|
||||
import python
|
||||
import experimental.meta.ConceptsTest
|
||||
@@ -0,0 +1,3 @@
|
||||
from starlette.responses import FileResponse
|
||||
|
||||
FileResponse("file") # $ getAPathArgument="file"
|
||||
@@ -1,2 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
failures
|
||||
|
||||
@@ -20,6 +20,8 @@ builtins.open(file="file") # $ getAPathArgument="file"
|
||||
|
||||
io.open("file") # $ getAPathArgument="file"
|
||||
io.open(file="file") # $ getAPathArgument="file"
|
||||
io.open_code("file") # $ getAPathArgument="file"
|
||||
io.FileIO("file") # $ getAPathArgument="file"
|
||||
|
||||
f = open("path") # $ getAPathArgument="path"
|
||||
f.write("foo") # $ getAPathArgument="path" fileWriteData="foo"
|
||||
|
||||
Reference in New Issue
Block a user