Skip to content

Commit

Permalink
Convert EchoContextBinder to MaD
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Jun 27, 2024
1 parent 7a55f55 commit f8b5d29
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
1 change: 1 addition & 0 deletions go/ql/lib/ext/github.com.labstack.echo.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ extensions:
pack: codeql/go-all
extensible: sourceModel
data:
- ["github.com/labstack/echo", "Context", True, "Bind", "", "", "Argument[0]", "remote", "manual"]
- ["github.com/labstack/echo", "Context", True, "Param", "", "", "ReturnValue[0]", "remote", "manual"]
- ["github.com/labstack/echo", "Context", True, "ParamValues", "", "", "ReturnValue[0]", "remote", "manual"]
- ["github.com/labstack/echo", "Context", True, "QueryParam", "", "", "ReturnValue[0]", "remote", "manual"]
Expand Down
13 changes: 0 additions & 13 deletions go/ql/lib/semmle/go/frameworks/Echo.qll
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,6 @@ private module Echo {
}
}

/**
* A call to a method on `Context` struct that unmarshals data into a target.
*/
private class EchoContextBinder extends RemoteFlowSource::Range {
EchoContextBinder() {
exists(DataFlow::MethodCallNode call |
call.getTarget().hasQualifiedName(packagePath(), "Context", "Bind")
|
this = FunctionOutput::parameter(0).getExitNode(call)
)
}
}

/**
* `echo.Context` methods which set the content-type to `text/html` and write a result in one operation.
*/
Expand Down

0 comments on commit f8b5d29

Please sign in to comment.