mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Rust: Fix a couple more gaps.
This commit is contained in:
@@ -13,6 +13,7 @@ extensions:
|
||||
- ["<postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<postgres::client::Client>::query_typed_raw", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<postgres::client::Client>::simple_query", "Argument[0]", "sql-injection", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/rust-all
|
||||
extensible: sourceModel
|
||||
|
||||
@@ -9,6 +9,7 @@ extensions:
|
||||
- ["<tokio_postgres::client::Client>::prepare", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::prepare_typed", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::query", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::query_one", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::query_opt", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::query_raw", "Argument[0]", "sql-injection", "manual"]
|
||||
- ["<tokio_postgres::client::Client>::query_typed", "Argument[0]", "sql-injection", "manual"]
|
||||
|
||||
@@ -41,7 +41,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
println!("found person: {} {} {}", id, name, age);
|
||||
}
|
||||
|
||||
for message in &conn.simple_query("SELECT id, name, age FROM person")? { // $ MISSING: sql-sink
|
||||
for message in &conn.simple_query("SELECT id, name, age FROM person")? { // $ sql-sink
|
||||
if let postgres::SimpleQueryMessage::Row(row) = message {
|
||||
let id: i32 = row.get(0).unwrap().parse().unwrap(); // $ database-read
|
||||
let name: &str = row.get(1).unwrap(); // $ database-read
|
||||
|
||||
Reference in New Issue
Block a user