-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Rust: Add new MaD format based on QL-computed canonical paths #19790
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
Conversation
32ed987
to
ad9cadc
Compare
ad9cadc
to
63379df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduce a new “MaD” model format that uses QL-computed canonical paths by deprecating the old crate
-qualified extensible predicates and adding new 5-column predicates without the crate
parameter.
- Rename existing
sourceModel
,sinkModel
, andsummaryModel
predicates to*Deprecated
. - Add new 5-field extensible predicates (
sourceModel
,sinkModel
,summaryModel
) that omit thecrate
parameter. - Update all
.ext.yml
model files, tests, expected outputs, and QLL logic to use the new format and preserve the deprecated predicates.
Reviewed Changes
Copilot reviewed 102 out of 102 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
rust/ql/test/utils-tests/modelgenerator/CaptureSourceModels.ext.yml | Switch from sourceModel to sourceModelDeprecated |
rust/ql/test/utils-tests/modelgenerator/CaptureSinkModels.ext.yml | Switch from sinkModel to sinkModelDeprecated |
rust/ql/test/library-tests/dataflow/models/models.ext.yml | Replace repo::test entries with canonical main::… and 5-field records |
rust/ql/test/library-tests/dataflow/models/models.expected | Update expected output to match new canonical paths |
rust/ql/lib/codeql/rust/frameworks/url.model.yml | Deprecate summaryModel extension |
rust/ql/lib/codeql/rust/frameworks/tokio/net.model.yml | Deprecate sourceModel and summaryModel extensions |
rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml | Deprecate sourceModel and summaryModel extensions |
rust/ql/lib/codeql/rust/frameworks/tokio/fs.model.yml | Deprecate sourceModel extension |
rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml | Deprecate sinkModel and sourceModel extensions |
rust/ql/lib/codeql/rust/frameworks/stdlib/net.model.yml | Deprecate sourceModel and summaryModel extensions |
rust/ql/lib/codeql/rust/frameworks/stdlib/lang-core.model.yml | Deprecate summaryModel , sourceModel , and sinkModel |
rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml | Deprecate sourceModel , sinkModel , and summaryModel |
rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml | Deprecate sourceModel and summaryModel extensions |
rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml | Deprecate sourceModel , sinkModel , and summaryModel |
rust/ql/lib/codeql/rust/frameworks/stdlib/env.model.yml | Deprecate sourceModel extension |
rust/ql/lib/codeql/rust/frameworks/rustls.model.yml | Deprecate sourceModel and summaryModel extensions |
rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml | Deprecate sinkModel extension |
rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml | Deprecate sinkModel and sourceModel extensions |
rust/ql/lib/codeql/rust/frameworks/reqwest.model.yml | Deprecate sourceModel , sinkModel , and summaryModel |
rust/ql/lib/codeql/rust/frameworks/regex.model.yml | Deprecate summaryModel extension |
rust/ql/lib/codeql/rust/frameworks/postgres.model.yml | Deprecate sinkModel extension |
rust/ql/lib/codeql/rust/frameworks/log.model.yml | Deprecate sinkModel extension |
rust/ql/lib/codeql/rust/frameworks/libc.model.yml | Deprecate sourceModel and sinkModel extensions |
rust/ql/lib/codeql/rust/frameworks/http.model.yml | Deprecate sourceModel extension |
rust/ql/lib/codeql/rust/frameworks/futures.model.yml | Deprecate summaryModel extension |
rust/ql/lib/codeql/rust/frameworks/async-rs.model.yml | Deprecate sourceModel extension |
rust/ql/lib/codeql/rust/dataflow/internal/empty.model.yml | Add empty definitions for all *Deprecated predicates |
rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll | Rename and overload extensible predicates; adjust signatures |
rust/ql/lib/codeql/rust/dataflow/internal/FlowSummaryImpl.qll | Add callResolvesTo helper predicate |
rust/ql/lib/codeql/rust/dataflow/internal/DataFlowConsistency.qll | Remove obsolete consistency queries |
Comments suppressed due to low confidence (2)
rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll:236
callResolvesTo
is defined to take a singlepath
argument, but here it's called with two arguments (crate
,path
). Update the call tothis.callResolvesTo(path)
.
this.callResolvesTo(crate, path)
rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll:269
callResolvesTo
is defined to take a singlepath
argument, but here it's called with two arguments (crate
,path
). Update the call tothis.callResolvesTo(path)
.
this.callResolvesTo(crate, path)
41d3360
to
c88a504
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
It is not possible to overload
extensible
predicates, so the existing predicates have been suffixed withDeprecated
; once all existing models have been migrated to the new format, we can get rid of the deprecated predicates.