File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
rust/ql/src/queries/summary Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * @name Query Sinks
3
+ * @description Lists query sinks that are found in the database. Query sinks are flow sinks that
4
+ * are used as possible locations for query results. Cryptographic operations are
5
+ * excluded (see `rust/summary/cryptographic-operations` instead).
6
+ * @kind problem
7
+ * @problem.severity info
8
+ * @id rust/summary/query-sinks
9
+ * @tags summary
10
+ */
11
+
12
+ import rust
13
+ import codeql.rust.dataflow.DataFlow
14
+ import codeql.rust.security.SqlInjectionExtensions
15
+ import Stats
16
+
17
+ /**
18
+ * Gets a kind of query for which `n` is a sink (if any).
19
+ */
20
+ string getAQuerySinkKind ( DataFlow:: Node n ) {
21
+ ( n instanceof SqlInjection:: Sink and result = "SqlInjection" )
22
+ }
23
+
24
+ from DataFlow:: Node n
25
+ select n , "sink for " + strictconcat ( getAQuerySinkKind ( n ) , ", " )
You can’t perform that action at this time.
0 commit comments