Repository navigation
Rust: Add neutral models for spurious Vec and VecDeque sink models - #22871
Merged
geoffw0 merged 1 commit intoOct 22, 2026
Merged
Conversation
geoffw0
reviewed
Oct 22, 2026
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
I think this is the right approach and the models LGTM. Test cases prove they work. I've started a DCA run (additional CI), which I suspect will show a few real-world FP results disappearing.
geoffw0
approved these changes
Oct 22, 2026
geoffw0
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. We see a quite significant reduction in false positive results for the cleartext logging query.
Thank you for your contribution! 🚀
CommanderStorm
pushed a commit
to maplibre/martin
that referenced
this pull request
Oct 25, 2026
CodeQL's request-taint queries see nothing inside the 12 route handlers that `#[hotpath::measure]` instruments, the tile, TileJSON, catalog, font, sprite and style handlers among them. Its Rust extractor turns on every Cargo feature unless told otherwise ([docs](https://github.com/github/codeql/blob/codeql-cli/v2.27.3/rust/codeql-extractor.yml#L48-L54)), so hotpath's profiling is on, and the attribute then hands each async body to `hotpath::functions::measure_async` as an `async` block ([macro](https://github.com/hotpath-rs/hotpath/blob/4eb2e398d4a3bab902faa1809e6cfca48c1e919e/crates/hotpath-macros/src/lib_on.rs#L861-L864)) that CodeQL can't follow into. The CodeQL job now gives the extractor every workspace feature except the hotpath ones, read from `cargo metadata`, the way `just check` already leaves them out of its feature matrix. Seeing into those handlers, CodeQL flags their `req.connection_info()` calls, as it did [the OGC one on #3763](#3763 (comment)): its generated actix-web model makes `connection_info` an allocation and log sink, though it only reads the host, scheme and client address off the request. A neutral model in `.github/codeql/extensions`, which [code scanning loads on its own](https://docs.github.com/en/code-security/how-tos/find-and-fix-code-vulnerabilities/manage-your-configuration/edit-default-setup#extending-coverage-for-a-repository), cancels those generated sinks the way github/codeql#22871 does for `Vec`, until github/codeql#22884 ships the same rows upstream. With CI's suite and CodeQL 2.27.3, main goes from 7 results to 6, the OGC one included.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The generated standard library models mark
VecDeque::push_back,append,insert,reserveand 18 otherVecDequemethods, together withVec::insert,Vec::removeandVec::swap_remove, aslog-injectionsinks. They appear to come from the panic and out-of-memory messages inside those methods that print a length, capacity or index. As a resultrust/cleartext-loggingreportsqueue.push_back(x)as a write to a log file wheneverqueueis tainted by sensitive data.This adds neutral
sinkmodels for those methods next to the existingsplit_offandFrom::fromones, as in #21375. The neutral rows mirror the generated rows one for one, and every method concerned has onlylog-injectionsink models, so no other sink kind is suppressed.