-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CPP: Convert SQL tainted to IR dataflow.
- Loading branch information
Showing
2 changed files
with
54 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 23 additions & 21 deletions
44
cpp/ql/test/query-tests/Security/CWE/CWE-089/SqlTainted/SqlTainted.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
edges | ||
| test.c:15:20:15:23 | argv | test.c:21:18:21:23 | query1 | | ||
| test.c:15:20:15:23 | argv | test.c:21:18:21:23 | query1 | | ||
| test.c:15:20:15:23 | argv | test.c:21:18:21:23 | query1 | | ||
| test.c:15:20:15:23 | argv | test.c:21:18:21:23 | query1 | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
subpaths | ||
| test.c:14:27:14:30 | argv | test.c:21:18:21:23 | query1 indirection | | ||
| test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | | ||
| test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | | ||
| test.cpp:39:27:39:30 | argv | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | | ||
| test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | | ||
nodes | ||
| test.c:15:20:15:23 | argv | semmle.label | argv | | ||
| test.c:15:20:15:23 | argv | semmle.label | argv | | ||
| test.c:21:18:21:23 | query1 | semmle.label | query1 | | ||
| test.c:21:18:21:23 | query1 | semmle.label | query1 | | ||
| test.cpp:43:27:43:30 | argv | semmle.label | argv | | ||
| test.cpp:43:27:43:30 | argv | semmle.label | argv | | ||
| test.cpp:43:27:43:33 | access to array | semmle.label | access to array | | ||
| test.cpp:43:27:43:33 | access to array | semmle.label | access to array | | ||
| test.c:14:27:14:30 | argv | semmle.label | argv | | ||
| test.c:14:27:14:30 | argv indirection | semmle.label | argv indirection | | ||
| test.c:14:27:14:30 | argv indirection | semmle.label | argv indirection | | ||
| test.c:21:18:21:23 | query1 indirection | semmle.label | query1 indirection | | ||
| test.cpp:39:27:39:30 | argv | semmle.label | argv | | ||
| test.cpp:39:27:39:30 | argv indirection | semmle.label | argv indirection | | ||
| test.cpp:39:27:39:30 | argv indirection | semmle.label | argv indirection | | ||
| test.cpp:43:27:43:33 | access to array | semmle.label | access to array | | ||
| test.cpp:43:27:43:33 | access to array indirection | semmle.label | access to array indirection | | ||
subpaths | ||
#select | ||
| test.c:21:18:21:23 | query1 | test.c:15:20:15:23 | argv | test.c:21:18:21:23 | query1 | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:15:20:15:23 | argv | user input (argv) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:43:27:43:30 | argv | test.cpp:43:27:43:33 | access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:43:27:43:30 | argv | user input (argv) | | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv | user input (a command-line argument) | | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv indirection | user input (a command-line argument) | | ||
| test.c:21:18:21:23 | query1 | test.c:14:27:14:30 | argv indirection | test.c:21:18:21:23 | query1 indirection | This argument to a SQL query function is derived from $@ and then passed to mysql_query(sqlArg). | test.c:14:27:14:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv | test.cpp:43:27:43:33 | access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | | ||
| test.cpp:43:27:43:33 | access to array | test.cpp:39:27:39:30 | argv indirection | test.cpp:43:27:43:33 | access to array indirection | This argument to a SQL query function is derived from $@ and then passed to pqxx::work::exec1((unnamed parameter 0)). | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) | |