Skip to content

Add Actix framework modeling and import to Frameworks.qll #19461

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust/ql/lib/codeql/rust/Frameworks.qll
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions rust/ql/lib/codeql/rust/frameworks/Actix.qll
Original file line number Diff line number Diff line change
@@ -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"]

Check warning

Code scanning / CodeQL

Singleton set literal Warning

Singleton set literal can be replaced by its member.
|
this.asPat().getPat() = param.getAField()
)
}
}
Loading