Skip to content

Rust: Model futures::executor::block_on.#19095

Merged
geoffw0 merged 4 commits intogithub:mainfrom
geoffw0:blockon
Apr 7, 2025
Merged

Rust: Model futures::executor::block_on.#19095
geoffw0 merged 4 commits intogithub:mainfrom
geoffw0:blockon

Conversation

@geoffw0
Copy link
Copy Markdown
Contributor

@geoffw0 geoffw0 commented Mar 21, 2025

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.

@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Mar 21, 2025
Copilot AI review requested due to automatic review settings March 21, 2025 17:07
@geoffw0 geoffw0 added the no-change-note-required This PR does not need a change note label Mar 21, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a 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

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Apr 4, 2025

@paldepind this is a small change that has been waiting around a while. Would you mind giving a quick review?

paldepind
paldepind previously approved these changes Apr 7, 2025
Copy link
Copy Markdown
Contributor

@paldepind paldepind left a 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!

@geoffw0
Copy link
Copy Markdown
Contributor Author

geoffw0 commented Apr 7, 2025

Fixed merge.

@geoffw0 geoffw0 merged commit 88439b4 into github:main Apr 7, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants