Skip to content

Commit 7904ed9

Browse files
committed
Rust: Add query sink counts query for getting a breakdown.
1 parent c6a7be6 commit 7904ed9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @name Query Sink Counts
3+
* @description Lists the number of query sinks of each type found in the database. Query sinks are
4+
* flow sinks that are used as possible locations for query results. Cryptographic
5+
* operations are excluded.
6+
* @kind metric
7+
* @id rust/summary/query-sink-counts
8+
* @tags summary
9+
*/
10+
11+
import rust
12+
import codeql.rust.dataflow.DataFlow
13+
import Stats
14+
15+
from string kind, int num
16+
where num = strictcount(DataFlow::Node n | getAQuerySinkKind(n) = kind)
17+
select kind, num

0 commit comments

Comments
 (0)