From 52f2a9a8a6ee027738c05cb025afaf201d7dddcd Mon Sep 17 00:00:00 2001 From: Florin Coada Date: Mon, 5 May 2025 10:14:36 -0400 Subject: [PATCH] Add Actix framework modeling and import to Frameworks.qll --- rust/ql/lib/codeql/rust/Frameworks.qll | 1 + rust/ql/lib/codeql/rust/frameworks/Actix.qll | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 rust/ql/lib/codeql/rust/frameworks/Actix.qll diff --git a/rust/ql/lib/codeql/rust/Frameworks.qll b/rust/ql/lib/codeql/rust/Frameworks.qll index 0e91ed427ba4..0fe436e315d9 100644 --- a/rust/ql/lib/codeql/rust/Frameworks.qll +++ b/rust/ql/lib/codeql/rust/Frameworks.qll @@ -2,6 +2,7 @@ * This file imports all models of frameworks and libraries. */ +private import codeql.rust.frameworks.Actix private import codeql.rust.frameworks.rustcrypto.RustCrypto private import codeql.rust.frameworks.Poem private import codeql.rust.frameworks.Sqlx diff --git a/rust/ql/lib/codeql/rust/frameworks/Actix.qll b/rust/ql/lib/codeql/rust/frameworks/Actix.qll new file mode 100644 index 000000000000..fe5f17f378bb --- /dev/null +++ b/rust/ql/lib/codeql/rust/frameworks/Actix.qll @@ -0,0 +1,20 @@ +/** + * Provides modeling for the `Actix` library. + */ + + private import rust + private import codeql.rust.Concepts + private import codeql.rust.dataflow.DataFlow + + /** + * Parameters of a handler function + */ + private class ActixHandlerParam extends RemoteSource::Range { + ActixHandlerParam() { + exists(TupleStructPat param | + param.getResolvedPath() = ["crate::types::query::Query"] + | + this.asPat().getPat() = param.getAField() + ) + } + } \ No newline at end of file