Rust: Use angle brackets for trait item canonical paths - #22457
Open
hvitved wants to merge 3 commits into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e7f3f7f-82b3-403c-93fa-984f56c89a70
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new migration note conflicts with the existing August 19 note, and the public PR description links an inaccessible internal repository.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
rust/ql/lib/change-notes/2026-08-28-angle-bracket-trait-canonical-paths.md — The existing rust/ql/lib/change-notes/2026-08-19-trait-canonical-paths.md:4-6 still tells users… |
What changed in this PR
Updates Rust trait-item canonical paths to align with inherent implementation syntax and exact Models-as-Data matching.
Changes:
- Produces
<crate::Trait>::itemcanonical paths. - Migrates framework models and documentation.
- Refreshes generated extractor, dataflow, and query expectations.
| File | Description |
|---|---|
docs/codeql/codeql-language-guides/customizing-library-models-for-rust.rst |
Documents the new syntax. |
rust/ql/lib/change-notes/2026-08-28-angle-bracket-trait-canonical-paths.md |
Adds migration guidance. |
rust/ql/lib/codeql/rust/internal/PathResolution.qll |
Wraps trait prefixes in angle brackets. |
rust/ql/lib/codeql/rust/dataflow/internal/DataFlowImpl.qll |
Updates the canonical-path reference. |
rust/ql/lib/codeql/rust/frameworks/asyncstd/io.model.yml |
Migrates async-std trait models. |
rust/ql/lib/codeql/rust/frameworks/futures.model.yml |
Migrates futures trait models. |
rust/ql/lib/codeql/rust/frameworks/mysql-async.model.yml |
Migrates async MySQL models. |
rust/ql/lib/codeql/rust/frameworks/mysql.model.yml |
Migrates MySQL models. |
rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml |
Migrates cryptographic trait models. |
rust/ql/lib/codeql/rust/frameworks/sqlx.model.yml |
Migrates the SQLx executor model. |
rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml |
Migrates allocation-library models. |
rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml |
Migrates core trait models. |
rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml |
Migrates standard I/O models. |
rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml |
Migrates Tokio I/O models. |
rust/ql/lib/codeql/rust/frameworks/warp.model.yml |
Migrates Warp filter models. |
rust/ql/test/extractor-tests/canonical_path/canonical_paths.expected |
Updates canonical-path expectations. |
rust/ql/test/library-tests/dataflow/collections/inline-flow.expected |
Refreshes collection-flow expectations. |
rust/ql/test/library-tests/dataflow/global/inline-flow.expected |
Refreshes global-flow expectations. |
rust/ql/test/library-tests/dataflow/local/inline-flow.expected |
Refreshes local-flow expectations. |
rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected |
Refreshes modeled-flow expectations. |
rust/ql/test/library-tests/dataflow/models/models.ext.yml |
Migrates test extension models. |
rust/ql/test/library-tests/dataflow/models/models.expected |
Refreshes model expectations. |
rust/ql/test/library-tests/dataflow/sources/database/InlineFlow.expected |
Refreshes database-source expectations. |
rust/ql/test/library-tests/dataflow/sources/env/InlineFlow.expected |
Refreshes environment-source expectations. |
rust/ql/test/library-tests/dataflow/sources/web_frameworks/InlineFlow.expected |
Refreshes web-source expectations. |
rust/ql/test/library-tests/dataflow/strings/inline-taint-flow.expected |
Refreshes string-flow expectations. |
rust/ql/test/library-tests/dataflow/taint/inline-taint-flow.expected |
Refreshes taint-flow expectations. |
rust/ql/test/query-tests/security/CWE-022/TaintedPath.expected |
Refreshes path-query expectations. |
rust/ql/test/query-tests/security/CWE-078/CommandInjection.expected |
Refreshes command-query expectations. |
rust/ql/test/query-tests/security/CWE-079/warp/XSS.expected |
Updates the Warp source path. |
rust/ql/test/query-tests/security/CWE-089/SqlInjection.expected |
Refreshes SQL-query expectations. |
rust/ql/test/query-tests/security/CWE-117/LogInjection.expected |
Refreshes log-query expectations. |
rust/ql/test/query-tests/security/CWE-312/CleartextLogging.expected |
Refreshes logging expectations. |
rust/ql/test/query-tests/security/CWE-614/InsecureCookie.expected |
Refreshes cookie-query expectations. |
rust/ql/test/query-tests/security/CWE-798/HardcodedCryptographicValue.expected |
Updates the cryptographic model path. |
rust/ql/test/query-tests/security/CWE-918/RequestForgery.expected |
Updates the Warp source path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.

This follows up on #22376 by making canonical paths for trait items consistent with inherent implementation paths. Trait items now use
<crate::Trait>::iteminstead ofcrate::Trait::item.DCA is uneventful.