Skip to content

Rust: Update generated models for core and std #19440

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

paldepind
Copy link
Contributor

@paldepind paldepind commented May 1, 2025

This is just rerunning the model generator for core and std and adding a manual value flow summary for String::from. I think that one might've been lost due to primitives not being extracted and hence method resolution now working ideally for builtins.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label May 1, 2025
@paldepind paldepind force-pushed the rust-update-stdlib-models branch from fe3152b to 499d224 Compare May 1, 2025 08:54
@paldepind paldepind marked this pull request as ready for review May 1, 2025 10:47
@Copilot Copilot AI review requested due to automatic review settings May 1, 2025 10:47
@paldepind paldepind requested a review from a team as a code owner May 1, 2025 10:47
Copy link
Contributor

@Copilot 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 updates the generated CodeQL models for Rust’s core and std libraries to reflect recent library and CodeQL changes.

  • Regenerated the inline-flow.expected dataflow test to match updated model outputs and provenance distances.
  • Extended the stdlib alloc model with a new String::from conversion entry.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

File Description
rust/ql/test/library-tests/dataflow/modeled/inline-flow.expected Reordered and renumbered summaries for Result::unwrap, ptr::read, ptr::write, and adjusted MaD values for source edges.
rust/ql/lib/codeql/rust/frameworks/stdlib/lang-alloc.model.yml Added a manual model entry for <crate::string::String as crate::convert::From>::from.

redsun82
redsun82 previously approved these changes May 2, 2025
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

geoffw0
geoffw0 previously approved these changes May 2, 2025
Copy link
Contributor

@geoffw0 geoffw0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's difficult to review auto-generated changes like these, but the DCA run shows taint reach going up a little and nothing is broken. 👍

@paldepind paldepind dismissed stale reviews from geoffw0 and redsun82 via 3aed1c8 May 2, 2025 10:55
@paldepind
Copy link
Contributor Author

It's difficult to review auto-generated changes like these, but the DCA run shows taint reach going up a little and nothing is broken. 👍

I agree. And as we scale things up it will make even less sense to try and manually verify them.

I've merged main to resolve a conflict.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants