Skip to content

Commit 3bd4a20

Browse files
committed
Convert Chi::UserControlledFunction to MaD
1 parent dd1d5ec commit 3bd4a20

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
extensions:
2+
- addsTo:
3+
pack: codeql/go-all
4+
extensible: sourceModel
5+
data:
6+
- ["github.com/go-chi/chi", "", True, "URLParam", "", "", "ReturnValue", "remote", "manual"]
7+
- ["github.com/go-chi/chi", "", True, "URLParamFromCtx", "", "", "ReturnValue", "remote", "manual"]

go/ql/lib/semmle/go/frameworks/Chi.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ private module Chi {
88
/** Gets the package name `github.com/go-chi/chi`. */
99
string packagePath() { result = package("github.com/go-chi/chi", "") }
1010

11-
/**
12-
* Functions that extract URL parameters, considered as a source of remote flow.
13-
*/
14-
private class UserControlledFunction extends RemoteFlowSource::Range, DataFlow::CallNode {
15-
UserControlledFunction() {
16-
this.getTarget().hasQualifiedName(packagePath(), ["URLParam", "URLParamFromCtx"])
17-
}
18-
}
19-
2011
/**
2112
* Methods that extract URL parameters, considered as a source of remote flow.
2213
*/

0 commit comments

Comments
 (0)