Skip to content

Commit d264fb5

Browse files
authored
Merge pull request #20042 from geoffw0/sinknoise
Rust: Make rust/summary/query-sinks less noisy
2 parents 58aa758 + 26dae81 commit d264fb5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rust/ql/src/queries/summary/QuerySinks.ql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* @name Query Sinks
33
* @description Lists query sinks that are found in the database. Query sinks are flow sinks that
44
* are used as possible locations for query results. Cryptographic operations are
5-
* excluded (see `rust/summary/cryptographic-operations` instead).
5+
* excluded (see `rust/summary/cryptographic-operations` instead), as are certain
6+
* sink types that are ubiquitous in most code.
67
* @kind problem
78
* @problem.severity info
89
* @id rust/summary/query-sinks
@@ -13,6 +14,11 @@ import rust
1314
import codeql.rust.dataflow.DataFlow
1415
import codeql.rust.Concepts
1516
import Stats
17+
import codeql.rust.security.AccessInvalidPointerExtensions
18+
import codeql.rust.security.CleartextLoggingExtensions
1619

1720
from QuerySink s
21+
where
22+
not s instanceof AccessInvalidPointer::Sink and
23+
not s instanceof CleartextLogging::Sink
1824
select s, "Sink for " + concat(s.getSinkType(), ", ") + "."

0 commit comments

Comments
 (0)