mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Python: Model asyncpg.connection.connect()
This commit is contained in:
@@ -22,6 +22,7 @@ private module Asyncpg {
|
||||
// * - the result of `asyncpg.connect()` is awaited.
|
||||
// * - the result of calling `acquire` on a `ConnectionPool` is awaited.
|
||||
"asyncpg.Connection;asyncpg;Member[connect].ReturnValue.Awaited",
|
||||
"asyncpg.Connection;asyncpg;Member[connection].Member[connect].ReturnValue.Awaited",
|
||||
"asyncpg.Connection;asyncpg.ConnectionPool;Member[acquire].ReturnValue.Awaited",
|
||||
// Creating an internal `~Connection` type that contains both `Connection` and `ConnectionPool`.
|
||||
"asyncpg.~Connection;asyncpg.Connection;", //
|
||||
|
||||
@@ -22,6 +22,9 @@ async def test_connection():
|
||||
finally:
|
||||
await conn.close()
|
||||
|
||||
conn = await asyncpg.connection.connect()
|
||||
conn.execute("sql") # $ mad-sink[sql-injection]="sql"
|
||||
|
||||
|
||||
async def test_prepared_statement():
|
||||
conn = await asyncpg.connect()
|
||||
|
||||
Reference in New Issue
Block a user