-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Improve/add various models #21123
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
base: main
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| private class ImplicitDerefOutNode extends ImplicitDerefNode, OutNode { | ||
| private DataFlowCall call; |
Check warning
Code scanning / CodeQL
Dead code Warning
| bindingset[derefChain, borrow, strippedTypePath, strippedType] | ||
| private predicate hasNoCompatibleNonBlanketLikeTargetCheck( | ||
| string derefChain, BorrowKind borrow, TypePath strippedTypePath, Type strippedType | ||
| DerefChain derefChain, BorrowKind borrow, TypePath strippedTypePath, Type strippedType |
Check warning
Code scanning / CodeQL
Missing QLDoc for parameter Warning
2acbb4d to
33a698e
Compare
fs.model.ymld1a2295 to
9661b43
Compare
9661b43 to
f3d78a4
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
This PR improves Rust dataflow models by fixing typos and adding missing models based on triaging MISSING tags in test expectations.
Changes:
- Fixes
Argument[Self]→Argument[self]typos in fs.model.yml - Removes incorrect manual models for
as_mut_os_stringandinto_os_string(relying on generated models instead) - Adds new models for HTTP response body accessors, stdin read_line, Path/OsStr methods, Vec/slice deref, and borrow::Cow::to_mut
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| rust/ql/lib/codeql/rust/frameworks/stdlib/io.model.yml | Adds stdin read_line taint model |
| rust/ql/lib/codeql/rust/frameworks/stdlib/fs.model.yml | Fixes Self→self typos, removes incorrect manual models, adds missing Path methods |
| rust/ql/lib/codeql/rust/frameworks/stdlib/ffi.model.yml | Adds OsStr to_str, to_string_lossy, as_encoded_bytes models |
| rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml | Adds slice get model |
| rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml | Adds Vec deref model, Cow::to_mut model |
| rust/ql/lib/codeql/rust/frameworks/http.model.yml | Adds Response body accessors |
| rust/ql/test/query-tests/security/CWE-295/* | Updates test expectations (auto-generated) |
| rust/ql/test/query-tests/security/CWE-117/* | Updates test expectations (auto-generated) |
| rust/ql/test/library-tests/dataflow/sources/net/* | Updates test expectations (auto-generated) |
| rust/ql/test/library-tests/dataflow/sources/file/* | Updates test expectations (auto-generated) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Based on triaging some
MISSINGtags:Argument[Self]->Argument[self]typos.as_mut_os_stringandinto_os_string; the generated models are accurate.DCA is fine.