Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f9f771

Browse files
committed
C#: Add SQLiteCommand sinks.
1 parent d427527 commit 6f9f771

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • csharp/ql/lib/semmle/code/csharp/frameworks

csharp/ql/lib/semmle/code/csharp/frameworks/Sql.qll

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class IDbCommandConstructionSqlExpr extends SqlExpr, ObjectCreation {
3939
.hasQualifiedName([
4040
// Known sealed classes:
4141
"System.Data.SqlClient.SqlCommand", "System.Data.Odbc.OdbcCommand",
42-
"System.Data.OleDb.OleDbCommand", "System.Data.EntityClient.EntityCommand"
42+
"System.Data.OleDb.OleDbCommand", "System.Data.EntityClient.EntityCommand",
43+
"System.Data.SQLite.SQLiteCommand"
4344
])
4445
)
4546
}
@@ -67,7 +68,11 @@ private class IDbCommandConstructionSinkModelCsv extends SinkModelCsv {
6768
// EntityCommand
6869
"System.Data.EntityClient;EntityCommand;false;EntityCommand;(System.String);;Argument[0];sql;manual",
6970
"System.Data.EntityClient;EntityCommand;false;EntityCommand;(System.String,System.Data.EntityClient.EntityConnection);;Argument[0];sql;manual",
70-
"System.Data.EntityClient;EntityCommand;false;EntityCommand;(System.String,System.Data.EntityClient.EntityConnection,System.Data.EntityClient.EntityTransaction);;Argument[0];sql;manual"
71+
"System.Data.EntityClient;EntityCommand;false;EntityCommand;(System.String,System.Data.EntityClient.EntityConnection,System.Data.EntityClient.EntityTransaction);;Argument[0];sql;manual",
72+
// SQLiteCommand
73+
"System.Data.SQLite;SQLiteCommand;false;SQLiteCommand;(System.String);;Argument[0];sql;manual",
74+
"System.Data.SQLite;SQLiteCommand;false;SQLiteCommand;(System.String,System.Data.SQLite.SQLiteConnection);;Argument[0];sql;manual",
75+
"System.Data.SQLite;SQLiteCommand;false;SQLiteCommand;(System.String,System.Data.SQLite.SQLiteConnection,System.Data.SQLite.SQLiteTransaction);;Argument[0];sql;manual",
7176
]
7277
}
7378
}

0 commit comments

Comments
 (0)