Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions rust/ql/lib/change-notes/2025-09-29-actix-web-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: majorAnalysis
---
* Added basic models for the `actix-web` web framework.
13 changes: 13 additions & 0 deletions rust/ql/lib/codeql/rust/frameworks/actix-web.model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extensions:
- addsTo:
pack: codeql/rust-all
extensible: sourceModel
data:
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter range 0..7 appears to be a magic number. Consider adding a comment explaining why parameters 0-7 are considered remote sources, or if this should be a more specific range based on actual actix-web handler parameter patterns.

Suggested change
data:
data:
# The parameter range 0..7 is used to conservatively cover typical actix-web handler functions,
# which usually accept up to 7 parameters (e.g., HttpRequest, Path, Query, Data, etc.).
# If actix-web changes its handler signature conventions, this range should be updated accordingly.

Copilot uses AI. Check for mistakes.
- ["<actix_web::route::Route>::to", "Argument[0].Parameter[0..7]", "remote", "manual"]
# Actix attributes such as `get` expand to this `to` call on the handler.
- ["<actix_web::resource::Resource>::to", "Argument[0].Parameter[0..7]", "remote", "manual"]
- addsTo:
pack: codeql/rust-all
extensible: summaryModel
data:
- ["<actix_web::types::path::Path>::into_inner", "Argument[self]", "ReturnValue", "taint", "manual"]
Loading