-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Rust: Model futures::executor::block_on. #19095
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 PR introduces a model for futures::executor::block_on, ensuring that the function is appropriately reflected in the code analysis.
- Added a new model extension in futures.model.yml to capture block_on's behavior.
- Updated a test case in main.rs to properly indicate the value flow for futures::executor::block_on.
Reviewed Changes
Copilot reviewed 2 out of 6 changed files in this pull request and generated no comments.
File | Description |
---|---|
rust/ql/lib/codeql/rust/frameworks/futures.model.yml | Added a model extension entry for futures::executor::block_on. |
rust/ql/test/library-tests/dataflow/global/main.rs | Updated the comment to reflect the corrected hasValueFlow. |
Files not reviewed (4)
- rust/ql/test/library-tests/dataflow/global/inline-flow.expected: Language not supported
- rust/ql/test/library-tests/dataflow/global/viableCallable.expected: Language not supported
- rust/ql/test/library-tests/dataflow/local/DataFlowStep.expected: Language not supported
- rust/ql/test/query-tests/security/CWE-020/RegexInjection.expected: Language not supported
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
@paldepind this is a small change that has been waiting around a while. Would you mind giving a quick review? |
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.
Thanks for the heads up. LGTM!
Fixed merge. |
Model
futures::executor::block_on
. I believe several variations of this model couldn't be made to work a month ago, but work has been done on futures since and it now works (in its simplest form). Fixes a test case.