-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
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 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 |
DCA LGTM. |
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.