Skip to content

Commit

Permalink
Rust: Implement good suggestions from ql-for-ql.
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffw0 committed Nov 22, 2024
1 parent f2f577f commit 4c50c08
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rust/ql/lib/codeql/rust/frameworks/Reqwest.qll
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ private import codeql.rust.Concepts
* A call to `reqwest::get` or `reqwest::blocking::get`.
*/
private class ReqwestGet extends RemoteSource::Range {
CallExpr ce;

ReqwestGet() {
this.asExpr().getExpr() = ce and
ce.getExpr().(PathExpr).getPath().getResolvedCrateOrigin().matches("%reqwest") and
ce.getExpr().(PathExpr).getPath().getResolvedPath() = ["crate::get", "crate::blocking::get"]
exists(CallExpr ce |
this.asExpr().getExpr() = ce and
ce.getExpr().(PathExpr).getPath().getResolvedCrateOrigin().matches("%reqwest") and
ce.getExpr().(PathExpr).getPath().getResolvedPath() = ["crate::get", "crate::blocking::get"]
)
}
}

0 comments on commit 4c50c08

Please sign in to comment.