Skip to content

Rust: Make rust/summary/query-sinks less noisy #20042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion rust/ql/src/queries/summary/QuerySinks.ql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* @name Query Sinks
* @description Lists query sinks that are found in the database. Query sinks are flow sinks that
* are used as possible locations for query results. Cryptographic operations are
* excluded (see `rust/summary/cryptographic-operations` instead).
* excluded (see `rust/summary/cryptographic-operations` instead), as are certain
* sink types that are ubiquitous in most code.
* @kind problem
* @problem.severity info
* @id rust/summary/query-sinks
Expand All @@ -13,6 +14,11 @@ import rust
import codeql.rust.dataflow.DataFlow
import codeql.rust.Concepts
import Stats
import codeql.rust.security.AccessInvalidPointerExtensions
import codeql.rust.security.CleartextLoggingExtensions

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