File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,19 @@ module SqlExecution {
78
78
}
79
79
}
80
80
81
+ /**
82
+ * A data-flow node that performs SQL sanitization.
83
+ */
84
+ class SqlSanitization extends DataFlow:: Node instanceof SqlSanitization:: Range { }
85
+
86
+ /** Provides a class for modeling new SQL sanitization APIs. */
87
+ module SqlSanitization {
88
+ /**
89
+ * A data-flow node that performs SQL sanitization.
90
+ */
91
+ abstract class Range extends DataFlow:: Node { }
92
+ }
93
+
81
94
/**
82
95
* A data-flow node that executes a regular expression.
83
96
*
Original file line number Diff line number Diff line change @@ -32,3 +32,4 @@ private import codeql.ruby.frameworks.Slim
32
32
private import codeql.ruby.frameworks.Sinatra
33
33
private import codeql.ruby.frameworks.Twirp
34
34
private import codeql.ruby.frameworks.Sqlite3
35
+ private import codeql.ruby.frameworks.Mysql2
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module SqlInjection {
57
57
/**
58
58
* A call to `Mysql2::Client.escape`, considered as a sanitizer.
59
59
*/
60
- class Mysql2EscapeSanitization extends Sanitizer {
60
+ private class Mysql2EscapeSanitization extends Sanitizer {
61
61
Mysql2EscapeSanitization ( ) {
62
62
this = API:: getTopLevelMember ( "Mysql2" ) .getMember ( "Client" ) .getAMethodCall ( "escape" )
63
63
}
@@ -66,7 +66,7 @@ module SqlInjection {
66
66
/**
67
67
* A call to `SQLite3::Database.quote`, considered as a sanitizer.
68
68
*/
69
- class SQLite3EscapeSanitization extends Sanitizer {
69
+ private class SQLite3EscapeSanitization extends Sanitizer {
70
70
SQLite3EscapeSanitization ( ) {
71
71
this = API:: getTopLevelMember ( "SQLite3" ) .getMember ( "Database" ) .getAMethodCall ( "quote" )
72
72
}
You can’t perform that action at this time.
0 commit comments