Skip to content

Rust: Fill some gaps in our database models. #20208

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

Merged
merged 10 commits into from
Aug 13, 2025
Merged

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Aug 11, 2025

Fill in some gaps in our models of database sources and sinks.

Only partially tested, as these models are quite similar to existing models and to each other. I've also done some local testing and will do a DCA run in case of any surprises.

@geoffw0 geoffw0 requested a review from a team as a code owner August 11, 2025 18:35
@Copilot Copilot AI review requested due to automatic review settings August 11, 2025 18:35
@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Aug 11, 2025
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 fills gaps in database security models for Rust by adding missing SQL injection sinks and database source models across multiple database frameworks. The changes enhance security analysis capabilities by ensuring comprehensive coverage of database operations.

  • Adds missing SQL injection sink models for previously uncovered database methods
  • Adds database source models for data retrieval operations that were not tracked
  • Includes test cases to validate the new security models

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
rust/ql/test/library-tests/frameworks/rusqlite/main.rs Adds test cases for new rusqlite security models
rust/ql/test/library-tests/frameworks/postgres/main.rs Adds test cases for postgres security models including SimpleQueryRow
rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml Adds query_one sink and SimpleQueryRow source models
rust/ql/lib/codeql/rust/frameworks/sqlx.model.yml Adds Row source models for data retrieval methods
rust/ql/lib/codeql/rust/frameworks/rusqlite.model.yml Fixes syntax error and adds prepare_cached sink model
rust/ql/lib/codeql/rust/frameworks/postgres.model.yml Adds simple_query sink and Row/SimpleQueryRow source models

@geoffw0
Copy link
Contributor Author

geoffw0 commented Aug 12, 2025

DCA LGTM.

@geoffw0 geoffw0 merged commit 17b4682 into github:main Aug 13, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants