Rust: Remove sourceModelDeprecated, summaryModelDeprecated and sinkModelDeprecated#20109
Rust: Remove sourceModelDeprecated, summaryModelDeprecated and sinkModelDeprecated#20109
Conversation
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
|
Changes LGTM. I will approve CI workflows and start a small DCA run, then seek formal approval from another team member. |
|
Hi Copilot, are you able to run the QL autoformatter ( |
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
Applied QL autoformatter to Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot that's great. Please could you also add concise instructions to the
|
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
Added concise instructions to |
|
Oh one last thing, lets have a change note in |
Co-authored-by: geoffw0 <40627776+geoffw0@users.noreply.github.com>
Added concise change note in |
There was a problem hiding this comment.
Pull Request Overview
This PR removes deprecated extensible predicates from CodeQL for Rust's dataflow library, specifically eliminating the sourceModelDeprecated, sinkModelDeprecated, and summaryModelDeprecated predicates that included a crate parameter in favor of their non-deprecated counterparts.
- Removes three deprecated extensible predicates and their associated classes that used the old API with crate parameters
- Cleans up the empty model YAML file to remove references to deprecated extensibles
- Updates test interpretation logic to only reference non-deprecated predicates
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll | Removes deprecated predicates, classes, and updates test predicate |
| rust/ql/lib/codeql/rust/dataflow/internal/empty.model.yml | Removes deprecated extensible entries from model file |
| rust/ql/lib/change-notes/2025-07-23-remove-deprecated-dataflow-predicates.md | Adds change note documenting the removal |
| .github/copilot-instructions.md | Adds CodeQL CLI autoformatting instructions (unrelated to main changes) |
|
Code changes and DCA run LGTM. Ready for review by a third party. |
This PR removes the deprecated extensible predicates from CodeQL for Rust as requested in the issue.
Changes Made
Removed deprecated extensible predicates:
sourceModelDeprecated- deprecated predicate for flow sources with crate parametersinkModelDeprecated- deprecated predicate for flow sinks with crate parametersummaryModelDeprecated- deprecated predicate for flow summaries with crate parameterRemoved associated classes that used deprecated predicates:
SummarizedCallableFromModelDeprecated- flow summary class using deprecated predicateFlowSourceFromModelDeprecated- flow source class using deprecated predicateFlowSinkFromModelDeprecated- flow sink class using deprecated predicateUpdated supporting code:
interpretModelForTestpredicate to only reference non-deprecated predicatesempty.model.ymlto remove deprecated extensible referencesFiles Modified
rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll- removed deprecated predicates and classesrust/ql/lib/codeql/rust/dataflow/internal/empty.model.yml- removed deprecated extensible entriesVerification
✅ Confirmed no remaining references to deprecated predicates exist in the codebase
✅ Confirmed all non-deprecated functionality (
sourceModel,sinkModel,summaryModel) remains intact✅ Verified exactly 3 extensible predicates and 3 YAML entries remain for the non-deprecated versions
The non-deprecated predicates provide the same functionality without the crate parameter, which aligns with the newer API design.
Fixes #20108.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.