Skip to content

Commit 4cf0c8f

Browse files
authored
Merge pull request #18535 from GeekMasher/rust-sql-injection
Rust: Add Models As Data Sinks for SQL Injection
2 parents 35dbb6f + 39239fb commit 4cf0c8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rust/ql/lib/codeql/rust/security/SqlInjectionExtensions.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import rust
88
private import codeql.rust.dataflow.DataFlow
9+
private import codeql.rust.dataflow.internal.DataFlowImpl
910
private import codeql.rust.Concepts
1011
private import codeql.util.Unit
1112

@@ -47,4 +48,9 @@ module SqlInjection {
4748
class SqlExecutionAsSink extends Sink {
4849
SqlExecutionAsSink() { this = any(SqlExecution e).getSql() }
4950
}
51+
52+
/** A sink for sql-injection from model data. */
53+
private class ModelsAsDataSinks extends Sink {
54+
ModelsAsDataSinks() { sinkNode(this, "sql-injection") }
55+
}
5056
}

0 commit comments

Comments
 (0)