Skip to content

Commit 2ec64a9

Browse files
committed
Convert EchoContextBinder to MaD
1 parent 3fc598d commit 2ec64a9

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

go/ql/lib/ext/github.com.labstack.echo.model.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ extensions:
1010
pack: codeql/go-all
1111
extensible: sourceModel
1212
data:
13+
- ["github.com/labstack/echo", "Context", True, "Bind", "", "", "Argument[0]", "remote", "manual"]
1314
- ["github.com/labstack/echo", "Context", True, "Param", "", "", "ReturnValue[0]", "remote", "manual"]
1415
- ["github.com/labstack/echo", "Context", True, "ParamValues", "", "", "ReturnValue[0]", "remote", "manual"]
1516
- ["github.com/labstack/echo", "Context", True, "QueryParam", "", "", "ReturnValue[0]", "remote", "manual"]

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ private module Echo {
2222
}
2323
}
2424

25-
/**
26-
* A call to a method on `Context` struct that unmarshals data into a target.
27-
*/
28-
private class EchoContextBinder extends RemoteFlowSource::Range {
29-
EchoContextBinder() {
30-
exists(DataFlow::MethodCallNode call |
31-
call.getTarget().hasQualifiedName(packagePath(), "Context", "Bind")
32-
|
33-
this = FunctionOutput::parameter(0).getExitNode(call)
34-
)
35-
}
36-
}
37-
3825
/**
3926
* `echo.Context` methods which set the content-type to `text/html` and write a result in one operation.
4027
*/

0 commit comments

Comments
 (0)