sdk/golang/Web Frameworks/GoEchoContext
Web Frameworks

GoEchoContext

Represents echo.Context in the Echo HTTP framework (v4). Provides typed accessors for all parts of the HTTP request. All input methods are taint sources.

4 sources1 sink
Taint flow4 sources 1 sink
Sources — untrusted input
.QueryParam()
.FormValue()
.Param()
.Bind()
taint
Sinks — dangerous call
.Redirect()

Sources

.QueryParam()Source
#
Signature
QueryParam(name string) string

Returns URL query parameter value by name.

tracks:return
.FormValue()Source
#
Signature
FormValue(name string) string

Returns POST form value. Reads application/x-www-form-urlencoded or multipart/form-data.

tracks:return
.Param()Source
#
Signature
Param(name string) string

Returns URL path parameter value.

tracks:return
.Bind()Source
#
Signature
Bind(i any) error

Deserializes request body into i based on Content-Type. i becomes tainted.

tracks:0

Sinks

.Redirect()Sink
#
Signature
Redirect(code int, url string) error

Redirects to url. Sink for open-redirect.

tracks:1

Fully-Qualified Names

FQNField
github.com/labstack/echo/v4.Contextfqns[0]
*.Contextpatterns

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
require github.com/labstack/echo/v4 v4.11.4
rule.py
from codepathfinder.go_rule import GoEchoContext

Rules Using This Class