11/**
2- * Provides classes modeling security-relevant aspects of the I/O file write or file read operations
2+ * Provides classes modeling security-relevant aspects of the `anyio` PyPI package.
3+ *
4+ * See https://pypi.org/project/anyio.
35 */
46
57private import python
@@ -9,53 +11,10 @@ private import semmle.python.dataflow.new.TaintTracking
911private import semmle.python.Concepts
1012private import semmle.python.ApiGraphs
1113
12- /**
13- * Provides models for the `aiofile` PyPI package.
14- * See https://github.com/agronholm/anyio.
15- */
16- private module Aiofile {
17- /**
18- * A call to the `async_open` function or `AIOFile` constructor from `aiofile` as a sink for Filesystem access.
19- */
20- class FileResponseCall extends FileSystemAccess:: Range , API:: CallNode {
21- string methodName ;
22-
23- FileResponseCall ( ) {
24- this = API:: moduleImport ( "aiofile" ) .getMember ( "async_open" ) .getACall ( ) and
25- methodName = "async_open"
26- or
27- this = API:: moduleImport ( "aiofile" ) .getMember ( "AIOFile" ) .getACall ( ) and
28- methodName = "AIOFile"
29- }
30-
31- override DataFlow:: Node getAPathArgument ( ) {
32- result = this .getParameter ( 0 , "file_specifier" ) .asSink ( ) and
33- methodName = "async_open"
34- or
35- result = this .getParameter ( 0 , "filename" ) .asSink ( ) and
36- methodName = "AIOFile"
37- }
38- }
39- }
40-
41- /**
42- * Provides models for the `aiofiles` PyPI package.
43- * See https://github.com/Tinche/aiofiles.
44- */
45- private module Aiofiles {
46- /**
47- * A call to the `open` function from `aiofiles` as a sink for Filesystem access.
48- */
49- class FileResponseCall extends FileSystemAccess:: Range , API:: CallNode {
50- FileResponseCall ( ) { this = API:: moduleImport ( "aiofiles" ) .getMember ( "open" ) .getACall ( ) }
51-
52- override DataFlow:: Node getAPathArgument ( ) { result = this .getParameter ( 0 , "file" ) .asSink ( ) }
53- }
54- }
55-
5614/**
5715 * Provides models for the `anyio` PyPI package.
58- * See https://github.com/agronholm/anyio.
16+ *
17+ * See https://pypi.org/project/anyio.
5918 */
6019private module Anyio {
6120 /**
0 commit comments