Skip to content

Commit

Permalink
Convert Mux::RequestVars to MaD
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Jul 11, 2024
1 parent f9c706e commit 090ff82
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
6 changes: 6 additions & 0 deletions go/ql/lib/ext/github.com.gorilla.mux.model.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extensions:
- addsTo:
pack: codeql/go-all
extensible: sourceModel
data:
- ["github.com/gorilla/mux", "", True, "Vars", "", "", "ReturnValue", "remote", "manual"] # TODO: should be .MapValue (and .MapKey?)
12 changes: 9 additions & 3 deletions go/ql/lib/semmle/go/frameworks/Mux.qll
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
import go

/**
* DEPRECATED
*
* Provides classes for working with concepts in the Mux HTTP middleware library.
*/
module Mux {
/** An access to a Mux middleware variable. */
class RequestVars extends DataFlow::RemoteFlowSource::Range, DataFlow::CallNode {
deprecated module Mux {
/**
* DEPRECATED: Use `RemoteFlowSource::Range` instead.
*
* An access to a Mux middleware variable.
*/
deprecated class RequestVars extends DataFlow::RemoteFlowSource::Range, DataFlow::CallNode {
RequestVars() {
this.getTarget().hasQualifiedName(package("github.com/gorilla/mux", ""), "Vars")
}
Expand Down

0 comments on commit 090ff82

Please sign in to comment.