-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Rust: Clean up some models #20746
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?
Rust: Clean up some models #20746
Conversation
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 pull request reorganizes model definitions across the Rust standard library and framework files to improve code organization. The key changes involve moving models to more appropriate locations based on their module origins and adding support for the tokio-postgres and async-std frameworks.
- Added new model files for tokio-postgres and async-std frameworks
- Moved core::alloc::layout::Layout models from core.model.yml to alloc.model.yml
- Moved iterator chain/take models from tokio/io.model.yml to core.model.yml
- Reorganized string and arithmetic operation models between core and alloc files
Reviewed Changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rust/ql/lib/codeql/rust/frameworks/tokio/postgres.model.yml | New file adding SQL injection sinks and database sources for tokio-postgres client and row types |
| rust/ql/lib/codeql/rust/frameworks/tokio/io.model.yml | Removed misplaced iterator models that belong in core stdlib |
| rust/ql/lib/codeql/rust/frameworks/stdlib/core.model.yml | Added arithmetic operations and iterator models, removed Layout models moved to alloc, cleaned up string operation models |
| rust/ql/lib/codeql/rust/frameworks/stdlib/alloc.model.yml | Added Layout models from core, removed duplicate string operation models now in core |
| rust/ql/lib/codeql/rust/frameworks/asyncstd/net.model.yml | New file adding async-std network sources and I/O summaries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
How about the <_ as async_std::io::read::ReadExt>::read models in that file; should they be moved?
Clean up some models:
Shouldn't affect results (apart perhaps from lists of models used in tests).