|
| 1 | +{ |
| 2 | + "extensions": [ |
| 3 | + { |
| 4 | + "addsTo": { |
| 5 | + "pack": "codeql/python-all", |
| 6 | + "extensible": "sinkModel" |
| 7 | + }, |
| 8 | + "data": [ |
| 9 | + // `Connection`s and `ConnectionPool`s provide some methods that execute SQL. |
| 10 | + ["asyncpg.~Connection", "Member[copy_from_query,execute,fetch,fetchrow,fetchval].Argument[0,query:]", "sql-injection"], |
| 11 | + ["asyncpg.~Connection", "Member[executemany].Argument[0,command:]", "sql-injection"], |
| 12 | + // A model of `Connection` and `ConnectionPool`, which provide some methods that access the file system. |
| 13 | + ["asyncpg.~Connection", "Member[copy_from_query,copy_from_table].Argument[output:]", "path-injection"], |
| 14 | + ["asyncpg.~Connection", "Member[copy_to_table].Argument[source:]", "path-injection"], |
| 15 | + // the `PreparedStatement` class in `asyncpg`. |
| 16 | + ["asyncpg.Connection", "Member[prepare].Argument[0,query:]", "sql-injection"] |
| 17 | + ] |
| 18 | + }, |
| 19 | + { |
| 20 | + "addsTo": { |
| 21 | + "pack": "codeql/python-all", |
| 22 | + "extensible": "typeModel" |
| 23 | + }, |
| 24 | + "data": [ |
| 25 | + // a `ConnectionPool` that is created when the result of `asyncpg.create_pool()` is awaited. |
| 26 | + ["asyncpg.Connection", "asyncpg.ConnectionPool", "Member[acquire].ReturnValue.Awaited"], |
| 27 | + // a `Connection` that is created when |
| 28 | + // * - the result of `asyncpg.connect()` is awaited. |
| 29 | + // * - the result of calling `acquire` on a `ConnectionPool` is awaited. |
| 30 | + ["asyncpg.Connection", "asyncpg", "Member[connect].ReturnValue.Awaited"], |
| 31 | + ["asyncpg.Connection", "asyncpg", "Member[connection].Member[connect].ReturnValue.Awaited"], |
| 32 | + ["asyncpg.ConnectionPool", "asyncpg", "Member[create_pool].ReturnValue.Awaited"], |
| 33 | + // Creating an internal `~Connection` type that contains both `Connection` and `ConnectionPool`. |
| 34 | + ["asyncpg.~Connection", "asyncpg.Connection", ""], |
| 35 | + ["asyncpg.~Connection", "asyncpg.ConnectionPool", ""] |
| 36 | + ] |
| 37 | + } |
| 38 | + ] |
| 39 | +} |
0 commit comments