mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Add Pandas SQLi sinks
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import pandas as pd
|
||||
|
||||
import sqlite3
|
||||
|
||||
df = pd.DataFrame({'temp_c': [17.0, 25.0]}, index=['Portland', 'Berkeley'])
|
||||
df.sample().query("query") # $getCode="query"
|
||||
@@ -55,11 +55,13 @@ df = pd.read_sql_table("filepath", 'postgres:///db_name')
|
||||
df.query("query") # $getCode="query"
|
||||
df.eval("query") # $getCode="query"
|
||||
|
||||
df = pd.read_sql_query("filepath", 'postgres:///db_name')
|
||||
connection = sqlite3.connect("pets.db")
|
||||
df = pd.read_sql_query("sql query", connection) # $getSql="sql query"
|
||||
df.query("query") # $getCode="query"
|
||||
df.eval("query") # $getCode="query"
|
||||
|
||||
df = pd.read_sql("filepath", 'postgres:///db_name')
|
||||
connection = sqlite3.connect("pets.db")
|
||||
df = pd.read_sql("sql query", connection) # $getSql="sql query"
|
||||
df.query("query") # $getCode="query"
|
||||
df.eval("query") # $getCode="query"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user