Skip to content

Commit 398d2ac

Browse files
committed
Rust: Fix a couple more gaps.
1 parent 0544ea8 commit 398d2ac

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

rust/ql/lib/codeql/rust/frameworks/postgres.model.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ extensions:
1313
- ["<postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"]
1414
- ["<postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"]
1515
- ["<postgres::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
16+
- ["<postgres::client::Client>::simple_query", "Argument[0]", "sql-injection", "manual"]
1617
- addsTo:
1718
pack: codeql/rust-all
1819
extensible: sourceModel

rust/ql/lib/codeql/rust/frameworks/tokio-postgres.model.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ extensions:
99
- ["<tokio_postgres::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"]
1010
- ["<tokio_postgres::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"]
1111
- ["<tokio_postgres::client::Client>::query", "Argument[0]", "sql-injection", "manual"]
12+
- ["<tokio_postgres::client::Client>::query_one", "Argument[0]", "sql-injection", "manual"]
1213
- ["<tokio_postgres::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"]
1314
- ["<tokio_postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"]
1415
- ["<tokio_postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"]

rust/ql/test/library-tests/frameworks/postgres/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
4141
println!("found person: {} {} {}", id, name, age);
4242
}
4343

44-
for message in &conn.simple_query("SELECT id, name, age FROM person")? { // $ MISSING: sql-sink
44+
for message in &conn.simple_query("SELECT id, name, age FROM person")? { // $ sql-sink
4545
if let postgres::SimpleQueryMessage::Row(row) = message {
4646
let id: i32 = row.get(0).unwrap().parse().unwrap(); // $ database-read
4747
let name: &str = row.get(1).unwrap(); // $ database-read

0 commit comments

Comments
 (0)