Uh oh!
There was an error while loading. Please reload this page.
Rust: Use angle brackets for trait item canonical paths - #22457
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>
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.
Uh oh!
There was an error while loading. Please reload this page.
paldepind
left a comment
There was a problem hiding this comment.
One minor comment that you can decide on. Otherwise LGTM!
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4e7f3f7f-82b3-403c-93fa-984f56c89a70
Uh oh!
There was an error while loading. Please reload this page.

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.