Skip to content

Commit

Permalink
Fix operations for psycopg2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout Feys committed Aug 23, 2024
1 parent 813fae3 commit 47a6335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aikido_firewall/sinks/psycopg2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __getattr__(self, name):
def execute(*args, **kwargs):
run_vulnerability_scan(
kind="sql_injection",
op="pymysql.connection.cursor.execute",
op="psycopg2.Connection.Cursor.execute",
args=(args[0], Postgres()), # args[0] : sql
)
return self._execute_func_copy(*args, **kwargs)
Expand All @@ -53,7 +53,7 @@ def executemany(*args, **kwargs):
for sql in args[0]:
run_vulnerability_scan(
kind="sql_injection",
op="pymysql.connection.cursor.executemany",
op="psycopg2.Connection.Cursor.executemany",
args=(sql, Postgres()),
)
return self._executemany_func_copy(*args, **kwargs)
Expand Down

0 comments on commit 47a6335

Please sign in to comment.