Skip to content

Commit b1a6394

Browse files
committed
C++: SqlPqxxTainted.ql. Change @id in query metadata
1 parent 330eaea commit b1a6394

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-089/SqlPqxxTainted.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* @kind path-problem
77
* @problem.severity error
88
* @precision high
9-
* @id cpp/sql-injection
9+
* @id cpp/sql-injection-via-pqxx
1010
* @tags security
1111
* external/cwe/cwe-089
1212
*/
@@ -75,7 +75,7 @@ Expr getPqxxSqlArgument() {
7575
// to find ConnectionHandle/TransationHandle and similar classes which override '->' operator behavior
7676
// and return pointer to a connection/transation object
7777
e.getType().refersTo(t) and
78-
// transation exec and connection prepare variations
78+
// transaction exec and connection prepare variations
7979
(
8080
pqxxTransationClassNames(t.getName(), _) and
8181
pqxxTransactionSqlArgument(fc.getTarget().getName(), argIndex)
@@ -113,10 +113,10 @@ predicate isEscapedPqxxArgument(Expr argExpr) {
113113
// to find ConnectionHandle/TransationHandle and similar classes which override '->' operator behavior
114114
// and return pointer to a connection/transation object
115115
e.getType().refersTo(t) and
116-
// transation and connection escape functions
116+
// transaction and connection escape functions
117117
(pqxxTransationClassNames(t.getName(), _) or pqxxConnectionClassNames(t.getName(), _)) and
118118
pqxxEscapeArgument(fc.getTarget().getName(), argIndex) and
119-
// eval is escaped
119+
// is escaped arg == argExpr
120120
argExpr = fc.getArgument(argIndex)
121121
)
122122
}

0 commit comments

Comments
 (0)